I am trying to display a multiple text field in a SAIL gridField (Record Dashboa

I am trying to display a multiple text field in a SAIL gridField (Record Dashboard). My field contains multiple text values separated by ; .
My SAIL code doesn't work:
          a!gridField(
                    label: "Event Logs",
                    columns: {
                     rule!APN_uiGridTextColumnAuto(
                              label: "Description",
                              data: rf!logs,
                              alignment: "LEFT"
                     )
                    },
                    value: {
                     startIndex: 1,
                     batchSize: 6
                    }
          )
Expression evaluation error in rule 'apn_uigridtextcolumnauto' (called by rules 'apn_uisectiononecolumn' > 'hrp_uploadpanelcsv'): Invalid index: Cannot index property '' of type Text into type List of Text String (APNX-1-4198-000)

Any suggestions?
Thank you

OriginalPostID-167779

OriginalPostID-167779

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    If anyone's interested, I've devised a new example (based on philb's above, thanks) that takes the plaintext array rule input (here named ri!textArray), and enabled paging and sorting on-form.

    Note: I use updateCDT (found in "CDT Manipulation" plug-in) in this example just to get the plaintext array stored into a CDT-style local variable, though if anyone has a more elegant way to do so I'd be interested to see it. In all other ways, though, the following code is working.

    (I set the paging break size to 3, for demo purposes, but for general use it can be set to something less annoying)

    =load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 3,
    sort: a!sortInfo(
    ascending: true(),
    field: "text"
    )
    ),

    local!cdtArray: updateCDT(
    cdt: repeat(
    length(ri!textarray),
    { text: "" }
    ),
    fieldsAndValues: {
    text: ri!textarray
    }
    ),

    with(
    local!dataSubset: todatasubset(
    local!cdtArray,
    local!pagingInfo
    ),

    a!gridField(
    label: "Event Logs",
    totalCount: local!dataSubset.totalCount,
    columns: {
    a!gridTextColumn(
    label: "Description",
    data: property(local!dataSubset.data, "text", {}),
    field: "text",
    alignment: "LEFT"
    )
    },
    saveInto: local!pagingInfo,
    value: local!pagingInfo
    )
    )
    )
Reply
  • 0
    Certified Lead Developer
    If anyone's interested, I've devised a new example (based on philb's above, thanks) that takes the plaintext array rule input (here named ri!textArray), and enabled paging and sorting on-form.

    Note: I use updateCDT (found in "CDT Manipulation" plug-in) in this example just to get the plaintext array stored into a CDT-style local variable, though if anyone has a more elegant way to do so I'd be interested to see it. In all other ways, though, the following code is working.

    (I set the paging break size to 3, for demo purposes, but for general use it can be set to something less annoying)

    =load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 3,
    sort: a!sortInfo(
    ascending: true(),
    field: "text"
    )
    ),

    local!cdtArray: updateCDT(
    cdt: repeat(
    length(ri!textarray),
    { text: "" }
    ),
    fieldsAndValues: {
    text: ri!textarray
    }
    ),

    with(
    local!dataSubset: todatasubset(
    local!cdtArray,
    local!pagingInfo
    ),

    a!gridField(
    label: "Event Logs",
    totalCount: local!dataSubset.totalCount,
    columns: {
    a!gridTextColumn(
    label: "Description",
    data: property(local!dataSubset.data, "text", {}),
    field: "text",
    alignment: "LEFT"
    )
    },
    saveInto: local!pagingInfo,
    value: local!pagingInfo
    )
    )
    )
Children
No Data