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

Conditional string only if (smart) variable exists in AQL

Felix Herzog
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 10, 2024

Hi,

currently I have following Automation to give our users an overview over their current assets:

Hello {{issue.reporter.DisplayName}}, 
you have {{lookupObjects.size}} assets assigned to you:
{{#lookupObjects}}
{{objectType}}: {{Name}}
--------------------------------------
Hostname: {{Hostname}}
Serial: {{Serial Number}}
SIM number: {{SIM number}}
Last update: {{Updated}}

{{/}}

Some Assets don't have an SIM-Number. SO I want something like:

(following is pseudo-code)

{{if exists {{SIM Number}} SIM number: {{SIM Number}} }}

SO only if a SIM Number Entry exists, the Line "SIM-Number" should be posted.

 

Currently this just keeps empty. 

Is there a way to do so? A sort of conditional output?

 

Thank you

1 answer

0 votes
Vijay Dadi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2024

Hello @Felix Herzog ,

Try having If-Else block - that might work out.

Vijay

Suggest an answer

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

Atlassian Community Events