Our list IDs on form drop-downs are meaningful (more meaningful than the label, which is returned via the simplified answers method).
If you could include the ID in the simplified answer response it would save us a huge amount of time in post-processing (it's so hard to match these values through the full form JSON as the question and answer arrays are separate).
Some pictures attached to illustrate what I'm talking about! Thank you!
Choice ID has been added, see FormSimplifiedAnswer.choice field in Get form simplified answers Response.
Tested and confirmed! Wonderful, thanks @Iris Zhang - this is going to save us so much time and make forms far more useful. Much appreciated!
Kind regards, Iain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I'm getting excited about this but we've never used the Forms api.
We rely heavily on forms and have dove into Entity Properties to extract data out of our forms answers in lieu of JQL search. It's dicey at best. How can we use the Forms api to solve some of the issues we face when mining entity properties? I also see you're looking up form answers in a data connection? My mind broke. Would love to hear some of your use cases!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Iris Zhang would it also be possible to add the question id?
We have forms that have several levels of conditions and sometimes the same question (label) appears (but with different answer options). It would be nice to be able to distinguish these questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for bringing this to our attention. We have reviewed your request and attempted to include the question ID as well. However, we have confirmed that the question ID has been intentionally excluded from the "Get Simplified Answers" endpoint due to its instability and potential for unexpected changes upon editing the form. This could cause issues with your script or application.
We recommend using a specific `Field Key` for form fields that need to be distinguished, as this is more reliable and already included in the "Get Simplified Answers" endpoint.
If you don't require a flattened response, you can use a combination of the "Get Form" endpoint (available for both "Forms on Customer Request" and "Forms on Issue") and the "Get External Form Data" endpoint (currently only available for "Forms on Customer Request"; the equivalent for "Forms on Issue" is in development).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, @Iris Zhang , I will use the fieldkey.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the context of multiple selection questions, the simplified answers API has been utilizing a format such as {"answers": "value1, value2"}. Following this approach, would the format below be suitable for your tools to process?
[
{
"label": "Involved Departments",
"id": "4, 5, 6",
"answer": "HR, Finance, Sales"
},
{
"label": "fav food",
"answer": "pie"
},
{
"label": "Owner Department",
"id": "2"
"answer": "Corporate"
}
]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alternatively, there could be a choices field like so:
"choices": [
{
"id": 1,
"label": "Information Services"
},
{
"id": 2,
"label": "HR"
},
{
"id": 3,
"label": "Finance"
}]
and answers will still contain the original string of labels
"answers": "Information Services, HR, Finance"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've forms for receipt declarations where there are multiple sections so you can add different receipts. But the questions and thus the labels are the same. Is it possible to ad the question id also to this json response?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, question ids can be added
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks - @Iris Zhang's initial proposal would certainly work for us, if the ids follow the same logical pattern as the answer field it's easy and logical to parse.
Adding a separate choices array would also work (I presume @Tyler Wang this was intended to show only selected choices, and not all available choices)
I appreciate the response, this would be a huge improvement in the utility of this API service for us.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Iain McCarthy ,
I strongly agree that the JSON of the form is a nightmare and I don't understand why it should be this difficult. Questions and answers are stored in two different places. When you have the answer to a single/multiselect question you only get the id. Which you need to lookup at the question section. It is a horrible when you need to create a simple table in e.g. Confluence from your form with Automation for JIra.
I've written an Python script just to get the answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.