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

bad PropertyDefinition datashape

SOLVED
Level 5

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

Re: bad PropertyDefinition datashape

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

3 REPLIES 3

Re: bad PropertyDefinition datashape

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

Re: bad PropertyDefinition datashape

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

Thank you very much,

Marcel.

Highlighted

Re: bad PropertyDefinition datashape

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);

    }

}