Skip to main content
Question

How to Handle Empty ServiceNow Fields

  • August 12, 2026
  • 2 replies
  • 85 views

I’m trying to build a bot to retrieve ServiceNow case information, including Case Number, Assigned, and Created Date.

I’m running into an issue when one of the fields is empty. For example, if the Assigned field has no value in servicenow, the bot gets stuck on that Recorder Capture step and failed

Is there a way to have the bot continue processing the field when the value/property is empty and continue with the capture?


Note: we not allow to use Servicenow API for this task

 

 

 

2 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+6
  • Automation Anywhere Team
  • August 12, 2026

@Using an Error handler: Try (with no Catch) with the Recorder: Capture inside will try and extract data. If it fails, it just moves on, leaving the previous variable value alone (blank?). 


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+6
  • Automation Anywhere Team
  • August 12, 2026

@DanC25 You can remove the Catch action. Each Recorder: Capture that could fail needs a Try action around it. If the Recorder: Capture fails, the Try prevents the error and moves onto the next action. 

Try

    Capture

Try

    Capture

etc.

Another way around it is to have an If action that checks to see if the object exists before using Capture, but that's even wordier.