Need help on how to display all the rows of a column

Hi,

I have a DB table which has two columns,that is, ID and VALUE columns

And there are 5 rows.

My requirement is how to display (Value Columns) different values in five rich texts as their names.

Thanks

Faisal

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I think this can be very, very easy.

    index() and property() both do the same thing, but index() also does numerical indexes.

    property(local!cdt, "value", {}) returns the "value" column of a single local!cdt.  It returns an array of "value"s if local!cdt is an array.  Same for index().

    local!cdt: {{id: 1, value: "A"}, {id:2, value: "B"}, {id:3, value: "C"}},
    index(local!cdt, "value", {})

    Should return {"A", "B", "C"}  No looping required; property() and index() should both automatically loop for you.

    Once you have 5 text strings, just a!forEach( items: local!textStrings, expression: richText(....text: fv!item, ....))

    If you need to combine elements, gather your CDT in a local like you're doing now, then a!forEach( items: local!CDTData, expression: richText( . . . text: property(fv!item, "name", {}) & property(fv!item, "someOtherField"), ....))

  • 0
    Certified Lead Developer
    in reply to Dave Lewis
    but index() also does numerical indexes.

    technically both functions do, but as strongly as i harp about using only property() to get properties, i say the same about only using index() to get indexes.

Reply Children
No Data