Forums

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

How to use the "Field Name" value of {{userInputs.variable}}?

Tomáš Škarpa November 30, 2024

Hello,

How can you access the field name of the variable that was created with user input?

image.png

 

Additionally, is there a way to iterate over the array of userInputs to create for each one sub-task, instead of setting up multiple conditions (as in the screenshot)?

Thank you for your answers.

3 answers

1 vote
Marc - Devoteam
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.
November 30, 2024

Hi @Tomáš Škarpa 

Welcome to the community.

As {{userInputs.sfccdev}} and use an advanced branch, based on the variable should work in theory.

Tomáš Škarpa December 1, 2024

Hello @Marc - Devoteam

Thank you for the welcome.

Is this what you are suggesting?

image.pngimage.png

Tomáš Škarpa December 1, 2024

@Marc - Devoteam

 

That did return the value of true, not the Field Name of the checkbox.

image.png

This is what I am trying to retrieve..

image.png

Marc - Devoteam
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.
December 1, 2024

Hi @Tomáš Škarpa 

It might that the requirement you want to use doens't work.

Can you check if your requirements relates to: AUTO-744 

Like Tomáš Škarpa likes this
Bill Sheboy
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.
December 1, 2024

Hi @Tomáš Škarpa -- Welcome to the Atlassian Community!

Adding to the suggestions provided by Marc and John...

Let's clarify a bit: what is the type of your user input, "sfccdev: field which you are trying to advanced branch over?

I do not believe there is a multiple-select option field for user inputs.  Are you instead trying to split() a text field into values for creating the new user stories? 

Kind regards,
Bill

Like Tomáš Škarpa likes this
Tomáš Škarpa December 1, 2024

Hello @Bill Sheboy

They are multiple check-box inputs. Yes, I was also trying to use them in the advanced branching as {{userInputs.split()}} but I was not succesfull. It gave me an error.

Bill Sheboy
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.
December 1, 2024

Thanks for that information, and...

If you have multiple input fields, of type checkbox, your rule would not use an advanced branch as each field as only two possible values: true and false.

 

What do you want to happen for the four possible cases?

  1. both false
  2. sfccdev is false and muledev is true
  3. sfccdev is true and muledeve is false
  4. both true

 

0 votes
Tomáš Škarpa December 1, 2024

@John Funk @Marc - Devoteam

Seems that advanced branching on the userInputs creates a list?

{muledev=true, sfccdev=true}

this is {{test}} used in the title

image.png

 

image.png

0 votes
John Funk
Community Champion
November 30, 2024

Hi Tomáš - Welcome to the Atlassian Community!

What are you trying to do with the field? The value you are entering is a User, correct? If so, then why are you checking if the value of the user is called True? 

Tomáš Škarpa December 1, 2024

Hello @John Funk

Happy to be a part of the community. The value I am entering is what the user inputted (checked or unchecked box) to the popup he gets when he manually triggers the automation.

There are a bunch of checkboxes, that return either true or false. The checkboxes have a Label Name, which I am trying to re-use for the purpose of naming the sub-task created based on the checkbox true.

John Funk
Community Champion
December 1, 2024

Ah, would have been good to know the type of field you were using in the question. See Marc's answer above with the link to the JAC ticket you can vote for and follow. 

Like Tomáš Škarpa likes this

Suggest an answer

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

Atlassian Community Events