Skip to main content
1-Visitor
August 14, 2019
Solved

Displaying names, definitions and values of properties from Thingworx in a DataGrid in VuforiaStudio

  • August 14, 2019
  • 2 replies
  • 2588 views

Hello,

 

I want to display some information about all properties of a thing in a DataGrid in Vuforia Studio.

I need the name, the description (of definitions) and the value. It should look something like this:

 

NAME         VALUE        DESCRIPTION

name1         value1         descr1

name2         value2         descr2

...                ...                 ...

 

Displaying the names and descriptions in a DataGrid worked fine by using the service "GetPropertyDefinitions", drag and drop "All items" to the Data field and choose the columns I need. 

 

But I cannot find any solution to fill the column of values the same way. Do you have any idea?

Best answer by ytella

Hi @Felix01 ,

 

The Repeater widget might work well in this case. 

 

The data grid might be able to do this assuming some code crafted the infotable to look like the above with the fields (name, value, description). Might be cool to have a thingworx service to return a datashape like that, then it would be easy to use in the data-grid.

 

Hope this helps!

2 replies

17-Peridot
August 20, 2019

Hi @Felix01 ,

One way to get the values of a Thing in a DataGrid widget is by using the GetPropertyValues service of ThingWorx. 

  • Add the GetPropertyValues service of a Thing in Studio Data Panel
  • Bind All Items of the service to the Data property of the Data Grid widget
  • Choose the required columns to be displayed
  • Use a button widget to invoke the GetPropertyValues service
    • Drag and drop the click event of the button on to the Get PropertyValues service as shown below:Screenshot_37.png

       

    • The values are displayed on the grid widget upon clicking the button
Felix011-VisitorAuthor
1-Visitor
August 26, 2019

Hi @ytella ,

 

I have already tried that, but it did not lead to the desired result, because I need the values in the row of each property of the Thing.

 

When I do it like your suggestion, the grids format looks like this:

 

property1     prop2      prop3    ...

value1         value2     value3   ...

 

But the way I need them to be displayed is like this, because I want to display the values of all properties of a Thing with some additional information from the descriptions of each property:

 

prop1     value1     decription1

prop2     value2     decription2

prop3     value3     decription3

...           ...

 

Is there any way to show all these information in one DataGrid in a format like this?

ytella17-PeridotAnswer
17-Peridot
September 20, 2019

Hi @Felix01 ,

 

The Repeater widget might work well in this case. 

 

The data grid might be able to do this assuming some code crafted the infotable to look like the above with the fields (name, value, description). Might be cool to have a thingworx service to return a datashape like that, then it would be easy to use in the data-grid.

 

Hope this helps!

5-Regular Member
August 23, 2019

Hello Felix01,

If @ytella, response has answered your question, please mark it as an Accepted Solution for the benefit of others who may have the same question in the future.

Thank you for your contributions to the PTC Community.

Abarki