Flow designer - Check if variabler is not empty

gugaj
Tera Contributor
Hi, I have a catalog item that refers to changing attributes on a service. The item has several variables that can generate changes on attribut on the service, but the problem is that if the variables are empty, existing information on the service is overwritten.
Does anyone have tips on how in flow designer I first check that variables are not empty and then update only attributes on services that contain data in variables?

 

7 REPLIES 7

Sandeep Rajput
Tera Patron
Tera Patron

@gugaj Here is how you can check not empty.

Screenshot 2024-09-11 at 12.41.49 PM.png


Hi Sandeep,

Thanks for the feedback,

I was unclear. I want to make a check via flow  that several variables in requested item are not empty. Those variables that contain data must generate an update on attribus on cmdb_ci_service. Variables that do not contain data must be skipped so that existing data on service is not overwritten.

Thnx!

saivishwaja val
Tera Contributor

Use get catalog variables action and pull data

 

saivishwajaval_0-1726040996505.png

 

then use that data in if condition to check empty or not

saivishwajaval_1-1726041067323.png

 

 

Thank you saivishwaja! 

So far I have understood but how do I update only attributes based on variables that contain data? Should I have to add an condition= "is not empty" for each variable and then do a separate update for each variable?
I want to first capture all variables that contain data (and skip empty variabbles), and then run an update on each attribute based on variables that contain data.