Error in multidropdown field while using record in editable grid

Certified Senior Developer

Hi all,
I am trying to show data in an editable grid where they can edit data and save it to back to database. While trying to display, I am getting the following error

This is how the data is present in database

I tried using split function but it didnt resolve the issue. Can someone tell what I am missing here . I have attached the code

a!localVariables(
  local!data: /*Query*/,
  local!dropdown: { "A", "B", "C", "D"},
  a!gridLayout(
    label: "Editable Grid",
    labelPosition: "ABOVE",
    headerCells: {
      a!gridLayoutHeaderCell(label: "Platform")
    },
    columnConfigs: {},
    rows: {
      a!forEach(
        items: local!data,
        expression: a!gridRowLayout(
          contents: a!multipleDropdownField(
            label: "Platform",
            choiceLabels: local!dropdown,
            choiceValues: local!dropdown,
            value: fv!item['recordType!{a3bb3bf8-8475-4d37-8cdd-f8db72114a55}record.fields.{a4be7f3b-9f4c-4101-8518-99a99631768e}platform'],
            saveinto:fv!item['recordType!{a3bb3bf8-8475-4d37-8cdd-f8db72114a55}record.fields.{a4be7f3b-9f4c-4101-8518-99a99631768e}platform']
          )
        )
      )
    },
    selectionSaveInto: {},
    validations: {},
    shadeAlternateRows: true
  )
)

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Associate Developer

    Hi , 

    The backend sent "A; B" as one string, so we have split it. Please refer to this code.

    a!localVariables(
      local!data: rule!TA_QRY_UserAccess(),
      local!dropdown: { "A", "B", "C", "D"},
      a!gridLayout(
        label: "Editable Grid",
        labelPosition: "ABOVE",
        headerCells: {
          a!gridLayoutHeaderCell(label: "Platform")
        },
        columnConfigs: {},
        rows: {
          a!forEach(
            items: local!data,
            expression: a!gridRowLayout(
              contents: a!multipleDropdownField(
                label: "Platform",
                choiceLabels: local!dropdown,
                choiceValues: local!dropdown,
                value: split(fv!item['recordType!{a3bb3bf8-8475-4d37-8cdd-f8db72114a55}TA Users Access.fields.{a4be7f3b-9f4c-4101-8518-99a99631768e}platform'],"; ",{}),
                saveinto:fv!item['recordType!{a3bb3bf8-8475-4d37-8cdd-f8db72114a55}TA Users Access.fields.{a4be7f3b-9f4c-4101-8518-99a99631768e}platform']
              )
            )
          )
        },
        selectionSaveInto: {},
        validations: {},
        shadeAlternateRows: true
      )
    )

  • 0
    Certified Senior Developer
    in reply to Naina Kumari

    Thanks  . The error got resolved. I can see that for split() function you have used "; " as separator instead of ";". Like you have added extra space after semi colon for separation. Is it given because values are having one extra space after semi colon??

Reply Children