Create dynamic columns for the gridField based on the data.

Hello,

I am new to Appian and have a requirement to create grid columns dynamically based on the data available in the database. I need to generate these columns dynamically according to the available data.

Thank You..!!

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Associate Developer
    in reply to prashantk3550

    a!localVariables(
      local!items:rule!GT_firstName(),
      a!gridLayout(
        label: "Customer",
        headerCells: {
          a!gridLayoutHeaderCell(label: "First Name"),
          a!gridLayoutHeaderCell(label: "Gender"),
        },
        rows: a!forEach(
          items: local!items,
          expression: {
            a!gridRowLayout(
              contents: {
                a!textField(
                  value: fv!item['recordType!GT CustomerDetails.fields.firstName'],
                ),
                a!textField(
                  value: fv!item['recordType!GT CustomerDetails.fields.gender'],
                )
              }
            )
          },
        )
      )
    )