Question

Checking fields for null value

  • 11 January 2023
  • 6 replies
  • 68 views

Userlevel 1
Badge +3

Hello,

What is the easiest way to have a bot check to see if a field on a website is populated? I need to put logic in the bot I am doing that if a field is null (i.e. blank) to populate it with a period, but to leave it alone if it is already populated with text.

Thanks,

Jason Harper 


6 replies

Userlevel 4
Badge +9

@harperjg using DOM path identify the object and check the condition if object.value not null 

Userlevel 1
Badge +3

awesome. thank you!

Userlevel 1
Badge +3

@rbkadiyam  can I use that in a if condition? 

Userlevel 7
Badge +12

Hi @harperjg ,

 

You can use If → Object Exists condition for the same.

Userlevel 1
Badge +3

So, here is what I am doing…

  1. I am capturing the field and doing a “Get Property” action, and set the Property name “DOMXPath.” I am then setting the property in the “ShipInfoValue” variable:

For my If Statement condition, I am using the string condition telling it to check the variable to see if it does not equal null:
 

I am doing this correctly or I am I missing something?

 

Thanks!

Jason 

Userlevel 5
Badge +9

Hi @harperjg 

In the 1st screenshot, Check the properties which has the value i.e HTML Value or Item Value accordingly select the “Property Value” and try it should work.

Reply