Skip to main content
10-Marble
December 17, 2024
Solved

Adding new column field to infotable property of a thing in thingworx.

  • December 17, 2024
  • 3 replies
  • 920 views

I have a thing entity which has a set of properties, i want to add a new column to one of the thing properties which is a infotable. For example I have a property named "metatdata" which is a value collection which has a lot of other properties, i want to update one of these properties which is a infotable for example "Data1". This table has 2 columns "column1" and "column2", I want to add a new "column3" here and after that i need to update the values also for the new column. 

Thanks. 

Best answer by wcui

@AV_10867476 

here is an article which gives sample code to add field to an existing infotable.  

https://www.ptc.com/en/support/article/CS402961

3 replies

22-Sapphire I
December 17, 2024

I would recommend using a JSON property. This way you can update it to any structure without changing the design which may require a restart Thing.

Just remember that when updating the property value (not sure if this still applies to current version) you first assign property value to a temporary variable, update that, and then assign it back to the property.

wcui16-PearlAnswer
16-Pearl
December 25, 2024

@AV_10867476 

here is an article which gives sample code to add field to an existing infotable.  

https://www.ptc.com/en/support/article/CS402961

16-Pearl
December 30, 2024

Hi @AV_10867476 ,

It appears that some comment might answer your question.  For the benefit of other Community Members who may have the same question, it would be great if you could designate it as the Accepted Solution.

In the event that this response did not answer your question, please post your current status so that we can continue to support.

Thanks for using the PTC Community!

Regards,

Wcui