I'm working on automating data entry for a web based platform. It is not very intuitive, unfortunately, and I've hit a wall.
To summarize, I have a multiple individuals I am trying to assign to different Groups/Months/Days Each individual, when selected, will pull up a second window with a table that looks like this table below.
For reference, we'll say we've selected "Individual 1":
Group | Month | Day | Select? |
---|---|---|---|
A | 1 | 2 | Checkbox |
A | 1 | 15 | Checkbox |
A | 2 | 2 | Checkbox |
A | 2 | 15 | Checkbox |
B | 1 | 2 | Checkbox |
B | 1 | 15 | Checkbox |
B | 2 | 2 | Checkbox |
B | 2 | 15 | Checkbox |
In order to select the Group/Month/Day for the individual, the checkbox must be selected. The Properties for the first checkbox are as follows:
input type="checkbox" name="include_flag_0" value="Y" onclick="validateBudgetProcedureSchedule(document.frm_schedule, 'include_flag_0', 'ONT', 1, -1);"
The name value increases by 1 integer for each sequential checkbox.
I have a data set that outlines exactly which checkboxes should be selected for each individual, but I cannot for the life of me figure out how to get PowerAutomate to cycle through each checkbox "name", and check the box.
Basically, I need some solution that would allow the variable (Include_flag_#) to cycle through, select the applicable checkboxes for the selected individual. Furthermore, I cannot even get it to recognize the first checkbox (and yes, I have double checked that it is attaching to the new browser instance appropriately, so that is not the issue).
Finally, I'm not entirely sure how to dynamically move onto individual 2, which would be a whole new column of data in the data set.
Any ideas on how to accomplish this? I've tried the "Run JavaScript function on web page" and the following function:
function ExecuteScript()
{document.querySelectorAll("%Visit['Individual 1']%")[0].click();}
Where the %Visit['Individual 1']% is the list of Checkbox names that need to be selected.