cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

bad PropertyDefinition datashape

marcelpaiva
5-Regular Member

bad PropertyDefinition datashape

Hello,

Somehow I did manage to delete most fields from my PropertyDefinition datashape. I need to put the fields back on.

Would someone tell me which are the fields of this datashape so I can restore it?

Thank you in advance,

Marcel

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:marcelpaiva)

This is a system object that you aren't supposed to be able to edit ...

baseType - basetypename

description - string

isLogged - boolean

isPersistent - boolean

isReadOnly - boolean

name - string

View solution in original post

3 REPLIES 3
PaiChung
22-Sapphire I
(To:marcelpaiva)

This is a system object that you aren't supposed to be able to edit ...

baseType - basetypename

description - string

isLogged - boolean

isPersistent - boolean

isReadOnly - boolean

name - string

marcelpaiva
5-Regular Member
(To:marcelpaiva)

Yes, I don't know exaclty how it happened... If I ever discover I'll be posting it here.

Thank you very much,

Marcel.

marcelpaiva
5-Regular Member
(To:marcelpaiva)

I just found out how it happened: by altering the shape of that infotable I also did change the PropertyDefinition datashape. i'll be sure to create a different infotable next time.

var r = Things[Device].GetPropertyDefinitions(params);

// infotable datashape iteration

var dataShapeFields = r.dataShape.fields;

for (var fieldName in dataShapeFields) {

    if(fieldName != "description") {

r.RemoveField(fieldName);

    }

}

Top Tags