Get output of checkbox states in custom list

Hi,

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?

Thanks a lot!!
/Steffen

1 Like

If easier, I just need the names of the true checkboxes to pass to a workflow.

1 Like

Hey @stch

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

Hope this helps

Thanks
#nK

Hey Nithin,

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.

Do you have any suggestions on how to do this?

Appreciate it.

1 Like

Hey @stch

You are going to post the checkbox data after a final submit right ?

Thanks
#nK

Hey @Nithinkrishna

I need to capture the label value of the true checkboxes and pass this string as an input argument to a process after the user clicks a submit button

1 Like

Hey @stch

Just one small confirmation required from your side please…

Does the label value also changes or is it fixed ?

Thanks
#nK

Hi again,

Both the label names and number of checkboxes change depending on user selections.

1 Like

Hey @stch

I’m asking whether the below checkboxes displayed in the image with labels are constant in the Form UI right ?

User may chose the checkboxes dynamically as they want that’s fine…

Correct me if I’m wrong.

Thanks
#nK

Hey - No they are not. The labels change too depending on other selections in the app.

1 Like

Hey @stch

Here you go…

I just printed the output which has all the checkbox labels and its value

nmnithinkrishna_CB

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)

nmnithinkrishna_CB2

Here is the app file - nmnithinkrishna_dynamicCB.uiapp (120.1 KB)

Hope this helps

Thanks
#nK

Hey @Nithinkrishna

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.

1 Like

Hey @stch

Is it possible for you to share that uiapp file ?

Thanks
#nK

Hey @Nithinkrishna,

I have shared the uiapp with you in a private message.

Thanks

If you haven’t managed to work this out feel free to share this app with me so I can take a look :slight_smile:

If you did figure it out, please post the solution for others!

1 Like