I have a record that contains a grid field. Within this grid I have two columns

I have a record that contains a grid field. Within this grid I have two columns that contain information that I want to format. The first field is a user field that currently displays the userid. I would like to format that into a field that contains first name last name. I have a function that does the look up for me but I don't know how to apply it to the field. Here is the layout:
a!gridTextColumn(
label: "Owner",
                     field:"owner",
data: index(local!data,"owner",{}),
alignment: "CENTER"
),
function that I want to use is COMMON_formatUserFirstLastName that takes an input of type user.
The second column contains a deciaml value that I want to display as a formatted dollar amount. Here is the definition:

a!gridTextColumn(
label: "Price",
field: "dollars",
data: index(loca...

OriginalPostID-139815

OriginalPostID-139815

  Discussion posts and replies are publicly visible

Parents
  • Try this:

    a!gridTextColumn(
    label: "Owner",
              field:"owner",
    data: apply(rule!COMMON_formatUserFirstLastName, index(local!data,"owner",{})),
    alignment: "CENTER"
    ),
    a!gridTextColumn(
              label: "Price",
    field: "dollars",
    data: apply(fn!dollar, index(local!data, "dollars", {})),
    alignment: "CENTER"
    )

    Note that the approach here is to "apply" the rules to the owner list and the dollars list. Make sure that local!data.owner is a list of user and that local!data.dollars is a list of decimals or integers.
Reply
  • Try this:

    a!gridTextColumn(
    label: "Owner",
              field:"owner",
    data: apply(rule!COMMON_formatUserFirstLastName, index(local!data,"owner",{})),
    alignment: "CENTER"
    ),
    a!gridTextColumn(
              label: "Price",
    field: "dollars",
    data: apply(fn!dollar, index(local!data, "dollars", {})),
    alignment: "CENTER"
    )

    Note that the approach here is to "apply" the rules to the owner list and the dollars list. Make sure that local!data.owner is a list of user and that local!data.dollars is a list of decimals or integers.
Children
No Data