load( local!returnIndex, local!itemsToken, { a!gridLayout( headerCells: { a!gridLayoutHeaderCell(label: "ID"), a!gridLayoutHeaderCell(label: "Description") }, rows: a!applyComponents( function: rule!MA_TestGridRowLayout( gridItems: ri!gridItems, itemIndex: _ ), array: if(or(isnull(ri!gridItems), count(ri!gridItems) < 1), {}, 1+enumerate(count(ri!gridItems))), arrayVariable: local!itemsToken ) ), a!linkField( label: "Add Link", labelPosition: "COLLAPSED", links: a!dynamicLink( label: "+Add Item", value: {ID:null, Description:null}, saveInto: { a!save(ri!gridItems, append(ri!gridItems, save!value)), a!save(local!itemsToken, append(local!itemsToken, save!value)) } ) ), a!textField( label: "DEBUG items", value: ri!gridItems, readOnly: true ) } )