Requiremnt: When user clicks on "Add Grid" then an editable grid should be added and when the user clicks on "Add Row" then a row should be added to the respective grid
a!localVariables( local!count:1, local!data:a!forEach(items: enumerate(local!count)+1, expression: {{a!map(text1:"",text2:"")}}), a!sectionLayout( contents: { a!forEach( items: enumerate(local!count)+1, expression: a!gridLayout( label: "Grid"&fv!index, headerCells: { a!gridLayoutHeaderCell( label: "H1" ), a!gridLayoutHeaderCell( label: "h2" ) }, columnConfigs: { a!gridLayoutColumnConfig( ), a!gridLayoutColumnConfig() }, rows: a!forEach( items: local!data[fv!index], expression: a!gridRowLayout( contents: { a!textField( label: fv!item, value: "", saveInto: { a!save(local!data[fv!index]["text1"],save!value) } ), a!textField( label: fv!item, value: "", saveInto: { a!save(local!data[fv!index]["text2"],save!value) } ) } ) ), addRowLink: a!dynamicLink( label: "Add row", value: a!map(text1:"",text2:""), saveInto: { a!save(local!data[fv!index],append(local!data[fv!index],save!value)) } ) ) ), a!richTextDisplayField( value: a!richTextItem( text: "Add Grid", link: a!dynamicLink( saveInto: { a!save(local!count,local!count+1) } ) ) ) } ) )
The problem I am facing is that when I click on "Add Grid" it gets added but when I click on "Add Row" then it gets added to the local!data but it's not reflecting in the interface
Discussion posts and replies are publicly visible