Grid only has one row

Hi guys, 

I think I am close to the solution, but I've been stuck with this for a while and figured asking cannot hurt.

I am creating an interface which is supposed to show the user data from another User Input Task and have them confirm it has been input correctly. For this I use a read-only grid which I configured according to the Appian tutorial. However, it displays the data in only one row, albeit separated in the pre-defined columns (so e.g. it will say for Underlying "Underlying1; Underlying 2" in one cell).

The data is pulled from a CDT as a rule input. It contains "flat" data like single booleans, but also arrays. For this exercise, only arrays are concerned. Do I have to manipulate the data beforehand or am I missing something major?

My code:

a!gridField(
  label: "Fixing Levels",
  labelPosition: "JUSTIFIED",
  data: ri!product_cdt,
  columns: {
    a!gridColumn(
      label: "Underlying",
      value: fv!row.underlying,
      align: "START",
      width: "AUTO"
    ),
    a!gridColumn(
      label: "Fixing Date",
      value: fv!row.fixingDate,
      align: "START",
      width: "AUTO"
    ),
    a!gridColumn(
      label: "Fixing Type",
      value: fv!row.fixingType,
      align: "START",
      width: "AUTO"
    ),
    a!gridColumn(
      label: "Fixing Level",
      value: fv!row.fixingLevel,
      align: "START",
      width: "AUTO"
    ),
    a!gridColumn(
      label: "Fixing Factor",
      value: fv!row.fixingFactor,
      align: "START",
      width: "AUTO"
    )
  }

  Discussion posts and replies are publicly visible

Parents Reply
  • +1
    Certified Lead Developer
    in reply to Matthias Brixius

    Hi Matthias, 

    Instead of making the variables in the CDT as multiple, why dont you make them single and use your CDT as a multiple variable, so that your data can look like the below:

    local!data: {
    {
    fixingDate: "28/02/2022",
    fixingFactor: 1,
    fixingType: 3,
    fixingLevel: 1,
    underlying: "Test"
    },
    {
    fixingDate: "28/02/2022",
    fixingFactor: 1,
    fixingType: 3,
    fixingLevel: 1,
    underlying: "Test"
    }
    }

    Note that the grid will be making rows based on the count of your product_cdt and not what it's internal structure is. 

Children