How should I use the "multiple choice" inputs from "input dialog" activity to search a webpage one by one?

I set my “multiple choice” inputs as below, it’s like an array, and everytime it’s activated, I would do a little edit to remove the non-workday for each week. then I would use these inputs to search a specific webpage where it has Mon-Sun info, and I’ll use these inputs one by one to locate the spots I want to click on that page. that’s basically what I’m gonna do.
image

Hi @CHEN_YIJIAN,

If I understand correctly, the user would select the specific day and that would be output to the workday variable.

The automation would then go and search the website info for that day of the week?

Or are you trying to build something that will loop through each day of the week except for the non-working day(s) etc?

Hi TimK, let me give you one example, for this week, the user will edit the input by removing “;Sat;Sun”, then the automation will search “Mon” on the page, then click a link below the “Mon” to open a new window which is a form to be filled. after completing the form, the user will continue to search “Tue” then do the same till “Fri”. and next week the user would edit the input by removing only “;Sun”. for each week, the working day may be different, that’s why the user would edit the input at the beginning. hope it helps explain the situation. thanks.

Hello,

You are getting the days through user input and getting as array, so you can as well.

  1. getting the array from user input
  2. use for each activity to loop through each item in the array.
  3. inside the for loop, use a switch case activity and write separate case for each day(mon, these, wed etc) and pass the item from for loop as the switch condition.

Inside switch you can give any actions based on the day

thanks for the reply. could you pls advise what’s the activity for step 1 in StudioX?

Activity is Input dialogue only. As you are giving multiple options it all be like an array

I made a wrong understanding of “input dialog”, the “;” is an English character input, not a Chinese character input, in my first post, I made it to a Chinese “;”, so it shows a long string from Mon to Sun to me, but not an option list.

Actually the option list is not what I expected, because it can only select one at one time, I need to get input of multiple working days for a whole week. is there an activity from which we can get multiple options as an array at one time?

thanks.

@CHEN_YIJIAN
USE custom dialog activity
download this htmlForm.html
htmlForm.html (1.6 KB)
note you are free to edit htmlForm.html, you only have to focus on the part i circled (id = value that is returned to UIpath, e.g. if i select 周一 it will return “mon”

image

htmlForm.html
image
result
image

2 Likes

parse result like this
image
see my example
Main.xaml (7.6 KB)
and new html form so that it outputs chinese result
htmlForm.html (1.6 KB)

just post some additional setting here to illustrate the whole solution. just in case someone else might need it.

1 Like

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