Dynamic options in Input Dialog box

How to dynamically update the options in UiPath? For example I have an input dialog box with a drop down menu. When the user choses a certain option, it will direct to another input dialog box asking him to enter the new value. When iterated again, the drop down menu must contain the new value.

1 Like

we can mention that input alone in the property OPTIONS as a variable of type array
–in the beginning of the workflow we would have used the input dialog box to get the input from user and save them in a string variable named str_input with listvariable.ToArray() mentioned in the OPTIONS property
–that is use a ADD TO COLLECTIONS activity like this at last in your workflow
and mention the collection property as listvariable of type System.Collections.Generic.List(of string) with default value as New List(of string) defined in the variable panel and in the item mention the input given by the user i.e., str_input.ToString and change the type argument as string

–now this listvariable.ToArray() will be updated so that when the process comes again from the beginning the array

Cheers @Yashasri_Jakkula

1 Like

Use Input Dialogue Box
In Properties-Option
Add variables say {Var1,Var2,Var3}
Give Default values for them
Then Use switch cases for assigning new values for selected option above (Instead of case1 write var1 and so on) and assign new values to var1 var 2 and var3 respectively
Then if u loop it back then new values in input dialogue will be updated one

1 Like

Hi. Thanks for the suggestion. When I made the same changes the drop down would have only one string probably because the Input dialog box runs in a loop.

1 Like

Thank you. Based on my understanding of your reply, I am not looking to replace values.

You want to add new values?
If yes then instead of array use list of collection in option
Say List1.ToArray
Then in switch use add to collection for adding new values

1 Like

Is that ADD TO COLLECTIONS placed at the last of loop
Cheers @Yashasri_Jakkula

I am trying to do something like this.
Main.xaml (8.5 KB)

In input dialogue in option property you have given Arr instead of List