Input Dialog Features: Multiple choice selection

Is there any way to achieve selecting multiple options in the input dialog?

Based on the requirement, there is a need to select single or multiple options from the list available in the input dialog. Also, while selecting multiple options, it is needed to select all such options altogether but not one-by-one (processing for the first option and then navigate back and processing for the second option and so on…)

For example, I should select say three out of five options altogether and as per the selected choices, next action item should get executed.

Any help would be appreciable.

Don’t think so. Ugly workaround would be an input box to ask how many selections you want to make…then loop through to ask the same question X times…

ok… thanks for the update…

May not be helpful, but just sharing if it gives an idea how to proceed.
input.xaml (11.4 KB)

image

4 Likes

Hi @vvaidya, I’ve been trying to use this on a project to select multiple items. However, i can’t quite understand a few things.

  1. Why did you use a delay to run the VB.net without uipath closing it. I would like to, instead of using a delay, to run it and wait for the user to click “SUBMIT” and then continue the workflow.

  2. If you try to run it without using the delay, it will show a message of unexpected job termination. What does that mean ?

Thanks in advance,

Hey…

#1 For using the SUBMIT button click add an event handler to close the Form. I think I tried the button click, but still the form was not appearing without delay. Try adding something like this in the invoke code for the existing button.

AddHandler
btnID.Click, Sub(sender As Object,e As EventArgs) System.Windows.Forms.Application.Exit

#2 I’m pretty sure this has something to do with the argument direction that you are passing into the invoke code. Try changing everything to “In” and see.

Thanks,

Vinay

Heey @vvaidya , I managed to get the window to close on click using the handler, thanks a lot for that.

But i am still having some trouble with the “Unexpected Job Termination” message and i cannot find a solution anywhere.

I will attach the workflow file here. I tried using on element vanish, using the invoke method, changing every argument to in (except the ones that had to come out, of course). Nothing helps.

ForumFile.xaml (10.8 KB)

Try changing the arguments in your Xaml file to “IN” and keep the invoke code arguments as is.

1 Like

That worked @vvaidya. Thanks a lot!

If you are still using delay after Invoke as work around, attached code will work without delay and the workflow will pause until you click the finalize button or close form (x button)

Checkbox_Selection.xaml (10.4 KB)
.

4 Likes

That’s great! Thanks a lot! But how to insert a check box “Select/ Unselect All” for the List in checklist?

1 Like

hi there, thanks for this example. Is it possible for the vb.net code to handle a dynamic list of objects rather than an array?

I’m adding an unknown number of items to a list, which I’d then like to have as the checkbox options to select.

I’m getting the error - “Value of type System.Collections.Generic.List(Of Object) cannot be converted to 1-dimensional array of object”

I’m not sure how to change the code of line 18 to account for this.

checkedListBox1.Items.AddRange(countries)

Any help would be very much appreciated.

Best,

Jake

Hi @vvaidya thanks for sharing this, is exactly what I was looking for. I downloaded your code and work perfectly, but when I tried adding it to my project it gives me the following error on the for each item in

checkbox.CheckedItem:

The type CheckedListox is not defyned

Could you please help me? What can I do?

I hope that you don’t mind if I jump in.
Now we have Forms activities that would help us with this problem

vvaidya

Thank you very much!

Helpd me a lot!

Hi vvaidya,

Thank you for your workflow,

can i ask a question? i wanna add search box in your form how to add this workflow

hi tonynguyenle,

“But how to insert a check box “Select/ Unselect All” for the List in checklist?”

Could you had solved that problem? if it had solved can you share with me please?

Hi vvaidya,
Thanks for this workflow . It is very helpful to me. But i have one challenge whether you can help me on this.

  1. If the checkbox is checked and i have give close button. Form is closed but it returning the checked value.

How to close the form without returning any value when user clicked on cancel button,if checkbox is checked also.

Waiting for your response here.

Thank you

Hi,

I got an error on invoke code activity.
Is there any solution?

If anyone can assist, I would be grateful. I used this solution and was able to make it partially work…but have some errors. Would love to know if anyone has a solution???