I’m building an UiPath App, which has a custom list with checkboxes. I need to capture the state of each checkbox to use in a process the App will start.
The custom list is populates by a Data Service entity and has a variable number of records depending on the user’s selections.
I can get the state of each checkbox by binding the the value of the checkbox in the template, but only in a format like this: “true,false,true,false” etc.
I need to have an output like: “Value1;true;Value2;false;Value3;true;Value4;false” etc. to pass as an argument to the process that will be triggered.
How can I accomplish this when the labels in the list are dynamic?
This looks feasible. You are populating the checkbox labels using a variable name ?
You need to use Events to append the checkbox labels to a string whenever there is a True value & remove it whenever the value of the checkbox is false
Submit the final variable as an argument to the process on a button click and the process should be designed to understand the data format it receives for processing as required
Thanks for your suggestion. I did think of something like that, but I can’t figure out the logic to remove the value from the string whenever a checkbox is selected and then deselected.
I just printed the output which has all the checkbox labels and its value
To show you the dynamic part of it, I just changed the label name below manually (in your I believe it will change programmatically which will be taken dynamically by the app result variable as well)
Thanks for your try. However my checkboxes are part of a Custom List control, and therefore I cannot each checkbox field as you have done, because I only have one checkbox to select as part of the Custom List Template.
Hello, @stch
Have you found a solution? I have a similar custom list and I want to get all the rows which have the checkbox selected (true).
Can you please share what you found about?
Thanks!
I have a similar need in my app. I have managed to collect all the checkboxes values from a custom list when I select them, as you suggested with a string concatenated with “;”.
But I want also to remove an item from the list when I deselect a checkbox.
So I would need something like Replace(list, deselectedItem). It would be useful to have some replace or remove functions for strings, or maybe list variable type…