Question

Conditional question

  • 19 December 2022
  • 2 replies
  • 71 views

Userlevel 1
Badge +4

Hello everyone,

So I got another “newbie” question. I need to add logic to my bot to skip updating a record on the web page if there is no data found that matches the selection criterial. Basically the search will not return a radio button to select. I know I need to use the if statement action, but not quite sure how to put it into the bot. 

 

Thanks!

Jason 


2 replies

Userlevel 7
Badge +13

Hi @harperjg ,

 

You can use the If → Object does not exist condition to match your requirement.

 

 

Userlevel 3
Badge +6

Dear @harperjg,

 

To use an if statement to skip updating a record on a web page if there is no data that matches the selection criteria in Automation Anywhere, you can follow these steps:

  1. First, you will need to define the selection criteria that you want to use to search for the data on the web page. This could be based on certain values of form fields, or it could be based on the content of the web page itself.

  2. Next, you will need to use the "Extract Data" action to extract the data you need from the web page. This action allows you to specify the data you want to extract using CSS selectors, regular expressions, or other methods.

  3. Once you have extracted the data you need from the web page, you can use the "If" action to check whether there is any data that matches the selection criteria. If there is no data that matches the criteria, you can use the "Else" branch of the "If" action to skip the update and move on to the next step in your logic.

 

Regards,

Reply