Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Value Variable is empty in function

Leon Wiezorrek November 22, 2024

Hello,

 

I tryed to do a variable comment of a forms input.

I created a variable and filled it with the forms information an this works fine.

it returns the answer 1.

Variable.png

 

If i try to call the Variable in the comment it displays it perfectly fine

{{CustomVar}} --> 1

 

but if i try to use it in a other variable it just dosent shows information

{{issue.properties."proforma.forms.i1".design.questions.39.choices.get(CustomVar)}}

If i try the get with just the number it works perfect

{{issue.properties."proforma.forms.i1".design.questions.39.choices.get(1)}}

 

I also tryed to input the Value of the form directly but this didn't work aswell

 

{{issue.properties."proforma.forms.i1".design.questions.39.choices.get(issue.properties."proforma.forms.i1".state.answers.39.choices).label}}

 

I have no clue why this won't work.

Hopfully someone can help me

1 answer

1 vote
Alex Koxaras _Relational_
Community Champion
November 22, 2024

Hi @Leon Wiezorrek and welcome to the community,

This happens because your variable returns a string and not an interger. Try "asNumber" on your variable and let me know if that solves your issue.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/

Leon Wiezorrek November 22, 2024

Still doesn't work.

I tryed to add it to the variable

{{issue.properties."proforma.forms.i1".state.answers.39.choices.asNumber}}

also in the comment itself (Variable back to normal)

{{issue.properties."proforma.forms.i1".design.questions.39.choices.get(CustomVar.asNumber)}}

But 

{{issue.properties."proforma.forms.i1".design.questions.39.choices.get(1)}}

Worked

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events