Skip to main content
Solved

Checking fields for null value

  • 11 January 2023
  • 6 replies
  • 1336 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.

View original
Did this topic help answer your question?

6 replies

rbkadiyam
Forum|alt.badge.img+16
  • Navigator | Tier 3
  • 578 replies
  • 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
  • 12 replies
  • January 11, 2023

awesome. thank you!


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

@rbkadiyam  can I use that in a if condition? 


Padmakumar
Forum|alt.badge.img+13
  • Navigator | Tier 3
  • 785 replies
  • January 14, 2023

Hi @harperjg ,

 

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


Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • 12 replies
  • 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+17
  • Most Valuable Pathfinder
  • 2690 replies
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings