Hi everyone,
I'm having this issue not sure if it is something wrong with my code or Appian issue itself, please help.
I'm having an editable grid, the data for it is a data subset type local variable, and in rows I use forEach of its data. I already provided the id for the gridRowLayout(), but not sure why it does not store anything into my local variable. I also tried with fv!index and it does not work either.
This is my input local variable with data subset type:
Discussion posts and replies are publicly visible
mollyn126 Could you please provide the full details of the Data subset local variable? Specifically, I'd like to know the exact field values it contains and how you've defined Local!selectedAzureIds. Before proceeding, we need to verify everything on our end. For your reference, I've included a sample code snippet below.
a!localVariables( local!items: { { id: 1, item: "Item 1", qty: 1, unitPrice: 10 }, { id: 2, item: "Item 2", qty: 2, unitPrice: 20 } }, local!dataSubset: a!dataSubset( data: local!items, startIndex: 1, batchSize: 10, ), local!storedSelection, a!gridLayout( label: "Data Products", instructions: "Sample Data", headerCells: { a!gridLayoutHeaderCell(label: "Item"), a!gridLayoutHeaderCell(label: "Qty"), a!gridLayoutHeaderCell(label: "Unit Price"), a!gridLayoutHeaderCell(label: "Total", align: "RIGHT"), a!gridLayoutHeaderCell(label: " "), }, rows: a!forEach( items: local!dataSubset.data, expression: a!gridRowLayout( id: fv!item.id, contents: { a!textField( value: fv!item.item, saveInto: fv!item.item ), a!integerField(value: fv!item.qty, saveInto: fv!item.qty), a!floatingPointField( value: fv!item.unitPrice, saveInto: fv!item.unitPrice ), a!textField( value: a!currency( isoCode: "USD", value: tointeger(fv!item.qty) * todecimal(fv!item.unitPrice) ), readOnly: true, align: "RIGHT" ), a!richTextDisplayField( value: { a!richTextIcon( icon: "arrow-circle-down", showWhen: not(fv!isLast), link: a!dynamicLink( saveInto: { a!save( local!items, a!update( local!items, { fv!index, fv!index + 1 }, { index(local!items, (fv!index + 1), null()), fv!item } ) ) } ) ), a!richTextIcon(icon: "arrow-circle-up") } ) } ) ), selectable: true(), selectionValue: local!storedSelection, selectionSaveInto: local!storedSelection, rowHeader: 1 ), )
Output