0

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.

1 Answers1

0

This is my answer from a similar question here should be more or less the same, but it does not user javascript. You can use the 'Set check box state on web page' function

For this you will make use of a variable.

Dummy data:

enter image description here

Navigate to the element in the element list. The click on the 3 dots menu to see the options. Select Edit

enter image description here enter image description here

Then scroll down to the enabled selector, this will in most cases be the id of the element on the web page. enter image description here

replace the value with the name of the variable that will hold the control id value

enter image description here

Then in your loop assign the value of the UI element to the variable you used as the identifier. Line 7 (red 2) enter image description here

This should then fill the boxes as required. enter image description here

CobyC
  • 2,058
  • 1
  • 18
  • 24