Question
RBC
CA
Last activity: 4 Jan 2018 17:37 EST
Loop through a TreeView from Interrogation
Hi,
I have an interrogated TreeView control. How can I iteration through all the nodes and get the text/path?
I tried extracting the proxy but not sure which method I should use in robotics studio.
Any assistance is greatly appreciated.
Fiona
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Your Node may have children. You may need to loop through those children as well (the nodes property of treeNodeProxy3).
Pegasystems Inc.
US
You should be able to pass the Nodes property into a ListLoop and extract a proxy from there. It will be of the type of each node and from there you can do what you need to with each one.
RBC
CA
Hi Sasnt,
Do you have a code example?
Fiona
Pegasystems Inc.
US
I do not have an application with a TreeView that I currently have access to.
RBC
CA
Hi sasnt,
I tried this (see screen shot). It only shows the name of the root and exists the loop, can you please help?
Fiona
Accepted Solution
Pegasystems Inc.
US
Your Node may have children. You may need to loop through those children as well (the nodes property of treeNodeProxy3).
RBC
CA
Thank you, sasnt. It's working now. I just need to get all children below the root (one tier), so I just do another list loop again.
See screenshot for future reference...
-
Fan Yin