Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to check for empty Insight attribute in automation conditional logic

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2022

In an edit issue action I'm setting the value of the Affected Services field. In a previous step I have an "lookup object" action.

My objects have an attribute called Service and sometimes this attribute is empty. In those case I do not want to include it in the edit action.

 

{{#lookupObjects}}
{{#if(not(Service.equals("")))}}
{"id":"{{Service.Service ID}}"}
{{/}}

So far I am unable to check for an empty attribute.

I tried several notations including these but it always results in TRUE.

  • {{#if(not(Service.equals("")))}}
  • {{#if(not(exists(Service)))}}
  • {{#if(not(Service.isEmpty))}}

2 answers

1 accepted

2 votes
Answer accepted
Manon Soubies-Camy _Modus Create_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2022

Hi @Charlie Misonne,

Would it work if you just excluded objects with empty Service attribute from the lookup action? Using the following IQL:

<your current IQL query> AND "Service" IS NOT empty

Hope this helps!

- Manon

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2022

Simple and smart solution. Merci!

I still wonder why the conditional logic does not work but I won't spend any extra time on it.

0 votes
Reginaldo Souza Pereira January 25, 2023

Hello @Manon Soubies-Camy _Modus Create_ 

But I think when you have a scenario with many objects attributes, and someones of them are empty and others not empty. So in this case, you can't remove the object in the IQL, because this will remove the object with all attributes - the empties and not empties. In others words, I need a solution to be handled one by one attribute. Did you get my point?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events