data: local!noteData, columns: { a!forEach( items: local!fields, expression: a!gridColumn( label: fv!item, value: index(fv!row, fv!item, "") ) ) },
How do I convert the above code, this part:
expression: a!gridColumn( label: fv!item, value: index(fv!row, fv!item, "") )
To something like:
a!gridColumn(label: "Note",value: index(fv!row, "Note", "")),
a!gridColumn(label: "Name",value: index(fv!row, Name, ""))
Where both Note and Name are keys in a dictionary.
Thanks
Discussion posts and replies are publicly visible
a!localVariables( /* Example */ local!data: { a!map(Note: "Note1", Name: "Name1", Field: 123), a!map(Note: "Note2", Name: "Name2", Field: 123) }, local!fields: { "Note", "Name" }, /* Fields required */ a!gridField( data: local!data, columns: a!forEach( items: local!fields, expression: a!gridColumn( label: fv!item, value: index(fv!row, fv!item, "") ) ) ) )
Please, test it and let me know if this solve your problem.