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

Tree Widget Usage

Tree Widget Usage

Hi,

In order to represent a hierarchy of data in tree widget where should I fetch the service data? I tried to get a table from sql using select query but I was not able to display any runtime data in tree. How should I approach this to get output like the attachment?

treewidget.png

Thanks,

Shalini V.

 

 

3 REPLIES
Highlighted

Re: Tree Widget Usage

Hi @svisveswaraiya-,

 

You need to provide an infotable as input to the tree widget that has at least two columns, a parent ID and a sub-heading ID which you should define in your widget configuration in the mashup editor. The output from the SQL select query should work, maybe it is something in the configuration of the widget.

 

There is a video that can be found in the help file as well: https://www.youtube.com/watch?v=JHToI9VDZ78

 

http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FMashup_Builder%2...

 

Hope this helps,

Kind regards,

Johan Bester

Re: Tree Widget Usage

Hi jbester,

Thanks for your swift response. I referred the video but they are using the network but I am using the database table. I have attached the property configuration that I have set and my grid data. Please tell me what changes I should be making to get the output.

treewidget.pngruntimetreewidget.png

Re: Tree Widget Usage

Hi @svisveswaraiya-,

 

I see it is a bit confusing how the input should look. It seems like it must be something like this:

 

image1.jpg

 

and then your definitions under your tree widget must be:

 image2.jpg

  

where you have to define the RootParentID as a value in your selected ParentIDField as I did root in my first two rows. It is unclear from the video that this is required because the output from the GetNetworkConnections service has a value that is blank as below:image3.jpg

  

This means that your output from the SQL query you would have to restructure into an infotable similar in structure as above.

 

The result would then look something like this:

image4.jpg

I hope this has given some more clarity.