Enable to return multiple values on a editableGrid

Certified Associate Developer

Basically im developing a start form where i get a list of records that contain a a docID and a dropdown. 

The interface has a editable grid where the user can add rows and per row the user can add a document (file uploadField) and a dropdown. 

My issue is that on both fields i selected the value and the save with ri!VALUE and when i add a document it makes it so that in all the rows that document is selected and the same for the dropdowns.

How can i make that per row created the save and the value creates a new array? In the interface i have already selected the ri! as multiple.  

ill leave the code here , and thanks in advance to all, 

a!localVariables(
  local!rowsTemp: a!gridRowLayout(
    contents: {
      a!fileUploadField(
        label: "Input File",
        labelPosition: "ABOVE",
        validations: {},
        target: cons!FOLDER,
        saveInto: ri!input[record.docID],
        value:local!doc,     
      ),
      a!dropdownField(
        choiceLabels: LABELS,
        choiceValues: codes,
        label: "",
        labelPosition: "ABOVE",
        placeholder: "--- Select a Value ---",
        saveInto: ri!input[record.docID],
        searchDisplay: "AUTO",
        validations: {}
      )
    }
  ),
  local!AddRow:  a!gridRowLayout(  contents: {
    a!fileUploadField(
      label: "Input File",
      labelPosition: "ABOVE",
      validations: {},
      target: cons!FOLDER,
      saveInto: ri!input[record.docID],
      value:local!doc,     
    ),
    a!dropdownField(
      choiceLabels: LABELS,
      choiceValues: codes,
      label: "",
      labelPosition: "ABOVE",
      placeholder: "--- Select a Value ---",
      saveInto: ri!input[record.docID],
      searchDisplay: "AUTO",
      validations: {}
    )
  }),
 
    a!columnsLayout(
      columns: {
        a!columnLayout(
          contents: {
            a!gridLayout(
              label: "Input Doc",
              labelPosition: "ABOVE",
              headerCells: {
                a!gridLayoutHeaderCell(label: "Input Doc"),
                a!gridLayoutHeaderCell(label: "Doc Date")
              },
              columnConfigs: {},
              rows: { local!rowsTemp },
              selectionSaveInto: {},
              addRowLink: a!dynamicLink(
                label: "Add Source",
                value: a!map(
                  id: null(),
                  document: null(),
                  sourceType: null()
                ),
                saveInto: {
                  a!save(
                    local!rowsTemp,
                    append(local!rowsTemp, local!AddRow)
                  ),
                  a!save(local!rows, local!rows + 1)
                },
                showWhen: local!rowsUnder30,
 
              ),
              validations: {},
              shadeAlternateRows: true
            )
          }
        ),
        a!columnLayout(contents: {}, width: "NARROW_PLUS")
      }
    ),
    a!buttonArrayLayout(
      buttons: {
        a!buttonWidget(
          label: "Run ",
          style: "OUTLINE"
        )
      },
      align: "END"
    )
)

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data