The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to check attachment type field is empty or not in Flow Designer

Raviteja Kunal1
Tera Expert

I am trying to check whether an attachment type field on the incident form is attached or not in Flow Designer.

 

I have used string, null, and blank functional conditions but none working. How to achieve this?

 

TIA

 

@Ankur Bawiskar 

2 ACCEPTED SOLUTIONS

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

You could try the following:

 

  1. On your attachment type field, apply an 'Is null?' transform
  2. Set the operator to 'is not'
  3. In the value field, type true

LaszloBalla1_0-1672151778471.png

 

If there is no attachment, this transform with return true, otherwise it will return false. So you an play with these 2 values in your if condition.

View solution in original post

Strange, it was working fine for me. Is it field that had an attachment earlier but got deleted? If yes, then it will not be null, because it still has the sys_id of the attachment (even if the file is not visible on the UI). You can verify in Show XML menu or via Xplore if the field is truly empty or not.

View solution in original post

3 REPLIES 3

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

You could try the following:

 

  1. On your attachment type field, apply an 'Is null?' transform
  2. Set the operator to 'is not'
  3. In the value field, type true

LaszloBalla1_0-1672151778471.png

 

If there is no attachment, this transform with return true, otherwise it will return false. So you an play with these 2 values in your if condition.

Raviteja Kunal1
Tera Expert

Hi

It is not working, even the attachment is there or not, the field value is considered as false.

Strange, it was working fine for me. Is it field that had an attachment earlier but got deleted? If yes, then it will not be null, because it still has the sys_id of the attachment (even if the file is not visible on the UI). You can verify in Show XML menu or via Xplore if the field is truly empty or not.