I am attempting to include the Collapsible Tree Component Template in my experience pages to allow for device breakdown based on the device tags. I have decided to attempt this approach vs utilizing experience groups due to the amount of permutations required for our device network. The desired menu would look something like this:
-> myParentDeviceTag1
–>my1stChildDeviceTag1
—>my2ndChildDeviceTag1
---->device.name.[0]
---->device.name.[1]
–>my1stChildDeviceTag2
—>my2ndChildDeviceTag2
---->device.name.[3]
—>my2ndChildDeviceTag3
---->device.name.[4]
-> myParentDeviceTag2
and so on…
I believe the Collapsible Tree Component Template can do this, but I am struggling to get the device tags organized into a parent / child list (similar to the output of the Group: Summary Node). Can you provide some guidance on how I may achieve a parent/child list based on the desired device tags?
This is possible but is a little more advanced. You would have to use the Function Node to build up the data structure of your list of devices to look like this:
I think I can work with the function node on this. If I am understanding right, it sounds like I should loop through all devices and then reference the appropriate tags as I write the intended output in the parent child relationship. As far as how we are defining that, I’ll attempt an abstract explanation here.
We have added a data table that outputs from our ERP system and defines both user tags and device tags. I’ve decided to limit the amount of experience groups as the permutations would become numerous. As a device is provisioned, it is assigned an identifier that matches that from our ERP system. We have a workflow that runs on a scheduled and as-needed basis to assign the appropriate tags from our ERP system onto the device (and user - separately).
The desired user experience here is one where the user can define how to best organize their device suite. For example, a sales user could organize by:
Or, likewise, a corporate user could decide to organize by:
-> Market Segment
→ Brand Category
—> Parent Account Group
----> Location
-----> Device Type
-------> Device
From here, I believe I can return a single deviceId or array of deviceIds to apply to a context variable for the resulting dashboards.
If I can write the parent child relationship on the fly, this should be possible. Do you think this approach will work?
If so, do you think that the loop is the best method to incorporate with the function? And, if the loop is appropriate, I may need some guidance on how to find whether the parent value has been written and then add the appropriate children to that parent.