Converting Table(MsSQL) to tree component in ignition perspective

Hello. I am using Ignition perspective to create an application to view energy consumption across several plants. In this application, I want to create a tree that helps the user to navigate to a particular meter among these several plants.
eg. plant 1> area 3> machine 2> meter 10.

The data is in MsSQL DB with a table structure where all the plants, areas, machines, meters are all listed and mapped to corresponding parent ID.
ID / name / parentID / category
P001 / plant 1 / - / Plant <
P002 / plant 2 / - / Plant

A001 / Area 1 / P001 / Area
A002 / Area 2 / P001 / Area
A003 / Area 3 / P001 / Area <

M001 / Machine 1 / A003 / Machine
M002 / Machine 2 / A003 / Machine <

E009 / EnergyMeter 9 / M002/ Energy Meter
E010 / EnergyMeter 10 / M002/ Energy Meter <

I would like map this table to the tree component available in the Ignition perspective. There are more than 2000 rows hence creating tags is not a viable option. If there was a solution to map using scripting, that would be great. Please let me know if there is a solution. Thanks.


1 Like

Has anyone figured this out? Valuable feature here.

By coincidence I have asked a very similar question just a few minutes ago. Any answer to mine may be of interest.