How to create multiple selections using excel value for users?

I would like to realize the function:
Ask the user to select different options from excel values, then filter those options to proceed delete rows. For example, it pop up a message box for user to multiple select the options, and then bot will automatically, using the selections user made to filter the columns and delete the rows.

we can create a template on excel, store it in the project folder

then we can paste the unfiltered values in the excel columns and then open the excel using Open application and passing that template’s address

then the pop-up can be displayed for user to make selection

then you can simply read the updated version of that template and you’ll have the filtered data.

which activity/command I can achieve it? Could you guide me on it? Maybe on Teams?

I see you mentioned in the question you need a pop-up for user to make selection. If you want to do it with excel as I mentioned above, you can simple use a message box activity to display the user a message stating ‘Make the selection in the excel and click ok’

This will be an easy approach to go about it. This can also be achieved using UiPath forms.

I mentioned the use of open application activity, that can be used to open the template, below os the document for that, once selection is made and the file is read in Datatable, you can use close application or kill ro close they excel.

Let me know if this is clear and makes sense

I have selection list(e.g. X1, X2, Y1, Y2, Z1, Y2) in column A in excel sheet1, and i want all 6 selections (X1, X2, Y1, Y2, Z1, Y2 )to be displayed in message box for user to choose, and user can multiple choose 3 options, for example, he choose X1, Y2 and Z2, and then show the results.

How it can be design?

(i would like the message box to show all selections exacting from excel value, instead of they manually filter by user themselves. )

if you need something like a pop-up then that’s possible using the UiPath forms

You can pass those values as a collection of argument and then use it in the checkbox values inside form and then user can simply check the checkbox to make selection and click submit

once form is submitted, then you’ll be able to get the values selected from user as an output of UiPath forms. It’ll be an json output, you can simply de serialize it using ‘Deserialize JSON’ from UiPath.Web.Activites.

Below link might help to create form

https://docs.uipath.com/activities/docs/create-form

1 Like

do you have any video instructions on it? Not sure I understand it.
But I will try, thanks a lot Rahulsharma!

Dear Rita,

Retrieve the selection list by reading the data from Excel,then pass this data to the input dialog.
User can select multiple options from the dialog using either of the 2 approaches:

Get the distinct options from the sheet:
dtSheet3.AsEnumerable().Select(Function(s) s.Field(Of String)(0)).ToArray()

Convert the options datatable to array for future use:
dtSheet3.AsEnumerable().Select(Function(s) s.Field(Of String)(0)).ToArray()

1.CustomDialog Activity
Input Dialog Features: Multiple choice selection - Help - UiPath Community Forum

2.UiPath Forms.

Thanks,
Geetishree Rao

Hi

To start in a simple way
We got an activity to do this in studio itself

Did we try with INPUT DIALOG BOX activity which is especially made to get the input from user and that can be made as a multiple option as well

There is a property in input dialog box activity like this

  • Options - An array of options to choose from. If set to contain only one element, a tex box appears to write text. If set to contain 2 or 3 elements, they appear as radio buttons to select from. If set to contain more than 3 items, they appear as a combo box to select from. This field supports only String Array variables. Ex. {“Item1”, “Item2”, “Item3”, “Item4”, “Item5”}

Here you go with an example of how to use it

This should work on a easy note
But still if you want to try with forms
Here you go with a sample xaml in it

Hope this would help you resolve this

Cheers @Rita_Guan

Hi Palaniyappan,

The selections are not fixed figures, but they are extracting from excel sheet (they are variable, the selections will change).
So the problem is in ‘Input Dialog’, how to write coding in ‘Options’ to covert data table format to array? Can you be specific on what to write in Expression Editor? thanks!

1 Like

Taking this as an example if you have your selection list in column A of a datatable named dt
But that dt has many other columns in it

  1. In that case Then first use a assign activity like this

dt_temp = dt.DefaultView.ToTable(True,”Column A”)

dt_temp is a variable of type Datatable defined in variable panel with default value as New System.Data.Datatable

This dt_temp will have only the first column with unique records in it

  1. Then use another assign activity like this

arr_selection = ( From row in dt_temp.AsEnumerable() Select Convert.Tostring(row(“Column A”)) ) .ToArray()

Arr_selection is a variable of type array of string defined in the variable panel

Now you can pass this array variable in input dialog box through the property Options

Hope this would help you resolve this

Cheers @Rita_Guan

Hello @Rita_Guan

I understand you are looking for the best solution.
Input dialog box ans forms are methods that’ll give you pop-up.

But to have a simpler approach you csn consider the excel option too.

I’ll build a sample “UiPath Form” option of the solution amd try to incorporate your usecase.

Highly appreciate if you could have a look at the excel option of solution and give a try foe UiPath form as explained above

Hi
Did this sequence of activity helped you resolve this

@Rita_Guan

Dear Rita,

Retrieve the selection list by reading the data from Excel,then pass this data to the input dialog.
User can select multiple options from the dialog using either of the 2 approaches:

Get the distinct options from the sheet:
dtSheet3.AsEnumerable().Select(Function(s) s.Field(Of String)(0)).ToArray()

Convert the options datatable to array for future use:
dtSheet3.AsEnumerable().Select(Function(s) s.Field(Of String)(0)).ToArray()

Thanks,
Geetishree Rao



Hi Palaniyappan,

the error message shown as above, could you help to check? thank you!

Hi

Please retype the expression from your end

@Rita_Guan

thanks a lot!! this was solved!!

1 Like

Glad @Rita_Guan

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.