For Each, Array and Input Dialog


I have three centers where you can view data with my bot, I need the user to be able to select a center using an input dialog and then have the selection used to hold an array that the bot will iterate through. The center name will hold an array of the employee names for that center. I then am using a for each to iterate through the names to collect the data. Can someone please show an example of successfully completing this or send me in the right direction? Thank you!


you have 3 centers will there be any data present in that?

if yes

then use for each activity and pass the output of inputdialog box

then iterate it

I tried this method and this is the error that occurs


can you send the value which you have passed in the for each activity

These are the values, but I believe I am doing it incorrectly. When the user selects a center, I need it to be updated for each center (variable of string containing names).



Userinput is a string variable i should not be passed in the for each activity

Yes, so how would I allow the user to choose a center and then have the bot iterate through the chosen center?


if the user selected option does not have values then flow this

if the input selected options having values then use for each

repeat the process for other 2 cases aslo

I’m trying this now! I will let you know if it works, thank you!


ok sure

Thank you


For some reason, nothing occurs after the input dialog is chosen. The bot just stops. Could you please look at this code and possibly fix my error or instruct me on my error?
Sequence1.xaml (35.8 KB)


its showing that document is invalid.

can you share the zip file of your xaml?

Sequence1.xaml (35.8 KB)
TestDoe.xlsx (15.6 KB)

I sent the file with test info inside, you should be able to use it to see if the bot will run.


share the file by making zip file (23.0 KB)


replace the values in the input dialog box as “Brooklyn;PineBluff;ClarksDale”


bot will enter into the activities

place the build datatable outside of for each activity


Thanks! I am still receiving this error though.


Dont create a variable with Brrokyln just pass the name

delete the for each activity and place new for each and try it will work


Thank you so much it works!!

1 Like