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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

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

Felix01
4-Participant

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

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?

1 ACCEPTED SOLUTION

Accepted Solutions
ytella
17-Peridot
(To:Felix01)

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!

View solution in original post

4 REPLIES 4
ytella
17-Peridot
(To:Felix01)

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
Felix01
4-Participant
(To:ytella)

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?

ytella
17-Peridot
(To:Felix01)

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!

abarki
15-Moonstone
(To:Felix01)

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

Top Tags