Assigning orders

Hi, I’m new, please be understanding. :pleading_face:

I would like to create a robot that will assign orders to my employees. When a new order appears, the “assigned” field is empty. I don’t know how to make the robot click on the order only if it is unassigned (empty field). An example is attached (new order in red, black - order assigned with an empty field). At this moment, the robot clicks on the first order (whether assigned or not). In addition, I don’t know how to make the robot finish the task if there are no new orders.
Please explain in detail, I’m still learning and I want to get better at it.

Thank You. :face_holding_back_tears:

Hi @sullivanne Does every time only one new order appears and that was at the top (first line)

Hello @ushu :slight_smile: there may be several orders, but they always appear at the top and have a blank field in the assigned column. I have to refresh the page to see if there are new orders.

@sullivanne

Open ui explorer and then indicate one of the cell in the table…and then you will have tablerow and table column properties by changing the values in it we can change each cell …

Your selector mostly looks like this

<webctrl tag=‘TD’ tablerow=‘2’ tablecol =‘1’ />

Use that in get text activity to get the value inside the cell…and check if string.IsNullOrEmpty(str)
str is the value returned by the get text…the condition is to be used in if …

This can be used inside a loop to change the numbers the loop can be a while loop and continue the loop till your rows are completed

Hope this helps

Cheers

1 Like

Try below steps

  • Seems like a table so indicate on the assigned field of first row with click activity
  • Check what the selector captures. Let’s assume the selector has row value, aaname (name of that element) should be empty in this case
  • Validate the selector, see if it’s highlighting the right element (it should highlight the empty field of first row)

Next Steps to handle multiple new orders:

  • If the above logic works, then the next change would be keep incrementing the row value by passing variable into the selector. Check below link on how to pass the variable into a selector
  • This way, it will go to each row and if the selector matches with the Assigned empty field then it clicks
  • If the selector doesn’t matches that means, there was no row with Assigned empty field
1 Like

@sullivanne

Your flow should be like this

  1. Do while loop with a boolean variable say bool insitialize it with true when you create before the do while loop starts
  2. Get text activity to get the value and in selector use a variable for tablerow…which can be a counter variable of type integer…
  3. If condition to check the isnullorempty
  4. On then side use the click activities and all for null…on else side do nothing…
  5. After if condition add a assignn activity and increment counter= counter+1

Have a try catch around 2,3,4 steps so that when the tablerow count reaches maximum it would fail…and in the catch block use assign activity and set bool to false

Instead of try catch you can add a check app state activity before with same selector as get text and on the then side have all the get text and related activities and on the else side add assign and set bool to false

The problem with yours is that only once you are getting the text and checking same value for each row

Hope this helps

Cheers

1 Like

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