Skip to main content
Answer

Checking fields for null value

  • January 11, 2023
  • 6 replies
  • 1642 views

Forum|alt.badge.img+4

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 

Best answer by ChanduMohammad

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.

6 replies

rbkadiyam
Premier Pathfinder | Tier 7
Forum|alt.badge.img+17
  • Premier Pathfinder | Tier 7
  • January 11, 2023

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


Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • January 11, 2023

awesome. thank you!


Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • January 13, 2023

@rbkadiyam  can I use that in a if condition? 


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • January 14, 2023

Hi @harperjg ,

 

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


Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • January 16, 2023

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 


Forum|alt.badge.img+22
  • Most Valuable Pathfinder
  • Answer
  • January 17, 2023

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.