Forums

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

How to retrieve form values from an issue with A4J smart value syntax

Dave Furlani
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.
April 3, 2025 edited

I'm trying to use A4J to pull data from JSM service requests with a form created through the portal. The data I need is in the form fields. 

The JSON for the issue suggests the field I'm interested in, labelled "Employee status", is customfield_10637, although the Field Key set in the Form edit UI is "employee-status" which doesn't appear in the JSON.

I've tried the following smart values, all of which produce nothing:

  • {{forms.last.Status}}
  • {{forms.Status}}
  • {{issue.customfield_10637}}
  • {{issue.customfield_10637.value}}
  • {{issue.customfield_10637.name}}
  • {{forms.first.Manager.displayName}}
  • {{forms.last.employee-status}}
  • {{forms.last}}
  • {{forms.last.employee-status}}

{{#forms}}{{index}}{{.}}{{/}} produces an ID key, which seems to change for each issue, so I'm not sure if that will help me or not.

For testing I have the rule as a Manual triggered rule.

Please advise how I would pull the data from the Employee status field in the form (it's a drop down) using smart values in an A4J rule (so that I can include it as text in a notification message). Thanks in advance

2 answers

2 accepted

7 votes
Answer accepted
Dave Furlani
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.
April 3, 2025

I found the solution. Sharing to help others in future.

Forms data can't be extracted with a manual trigger.

The "Form opened for edits" or "Forms created" triggers are needed to allow the {{forms}} smart value to return data.

{{forms.last.employee-status.label}} was the syntax required to return the value set in the drop down on the form.

 

3 votes
Answer accepted
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.
April 4, 2025

Hi @Dave Furlani 

More info can be found in this KB article.

access-smart-values-for-forms-and-form-fields 

Dave Furlani
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.
yesterday at 4:50 PM

Thanks mark. I did read that page, but read "setting up a rule" as setting a value, not reading a value. In my defence, it was a hectic few days and didn't have the mental bandwidth to absorbing the info

 

Like • Marc - Devoteam likes this

Suggest an answer

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

Atlassian Community Events