Skip to main content
1-Visitor
October 23, 2019
Solved

how to retrieve datashape default value in datatable using services

  • October 23, 2019
  • 1 reply
  • 1783 views

WeChat Screenshot_20191023123009.png

as attached picture, I have inserted data in the default value in the datashape. Now I want to retrieve data from datatable using services. how to do that?

Best answer by AndreaSteyn

Hi @xiaoqw,

 

Do you want to get the default value from the datashape specifically?  As far as I understand it from the data table itself you can only get data entries that have been added.

 

Perhaps try writing a custom script to get the default values from the Field Definitions with the getDefaultValue() method for the specific field definitions you want to get the data from.

 

This link gives more information on getting the filed definition:
https://support.ptc.com/cs/help/thingworx_hc/thingworx_6.6_hc/index.jspx?id=ID1239011955&action=show

1 reply

1-Visitor
October 25, 2019

Hi @xiaoqw,

 

Do you want to get the default value from the datashape specifically?  As far as I understand it from the data table itself you can only get data entries that have been added.

 

Perhaps try writing a custom script to get the default values from the Field Definitions with the getDefaultValue() method for the specific field definitions you want to get the data from.

 

This link gives more information on getting the filed definition:
https://support.ptc.com/cs/help/thingworx_hc/thingworx_6.6_hc/index.jspx?id=ID1239011955&action=show

Support
December 27, 2019

Hi @xiaoqw.

 

If the response provided by @AndreaSteyn allowed you to find a solution, please mark it as the Accepted Solution for the benefit of others with the same questions.

 

Regards.

 

--Sharon