Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

I have an array of questions that I want to present to a user. For each questio

I have an array of questions that I want to present to a user. For each question I want the user to give an answer from a dropdownField. I want to present all of the questions with a dropdown field next to each question. I am trying to do this in a gridLayout and I am only getting one item back. Here is a sample of the code.

a!gridLayout(
label: "",
headerCells: {
a!gridLayoutHeaderCell(label: "Question"),
a!gridLayoutHeaderCell(label: "Grade")
},
columnConfigs: {
a!gridLayoutColumnConfig(width: "DISTRIBUTE"),
a!gridLayoutColumnConfig(width: "NARROW")
},
rows: {
a!gridRowLayout(
contents:{
a!textField(
value: index(local!datasubset.data,"question",{})
),
a!dropdownField(
label:"Grade",
required: true(),
...

OriginalPostID-140315

OriginalPostID-140315

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    You need to put your a!gridRowLayout() in a sub-rule and then use a!applyComponents() to generate a row for each item in your data array. By passing in the index position to the sub-rule you can then display the relative value and saveInto attributes. Check out the SAIL Recipes on the help pages for examples of this.
Reply
  • 0
    Certified Lead Developer
    You need to put your a!gridRowLayout() in a sub-rule and then use a!applyComponents() to generate a row for each item in your data array. By passing in the index position to the sub-rule you can then display the relative value and saveInto attributes. Check out the SAIL Recipes on the help pages for examples of this.
Children
No Data