replicate read only grid/ gridColumn functionality into paging grid/gridTextColumn

I have a read-only grid in interface A, and one of the columns populates more than one value. The functionality also includes an expander and each value is linked to its respective record. Below is the code for that particular column. I would like to replicate this functionality in an existing interface B. My concern is that the interface B I am working in has a Paging Grid / Text Column and Interface A has a read-only grid/grid column. 

Interface A column code:

a!gridColumn(
label: "Transit Agency",
sortField: "transit_agency_name",
value: a!localVariables(
local!rowTransitAgencies: index(
local!vanpoolTransitAgencies,
wherecontains(
fv!row.vanpool_id,
index(
local!vanpoolTransitAgencies,
"vanpool_id",
{}
)
),
{}
),
local!rowTrasitAgencyCount: count(local!rowTransitAgencies),
local!showPartial: if(local!rowTrasitAgencyCount > 1, true, false),
if(
local!showPartial,
a!richTextDisplayField(
value: {
a!richTextItem(
text: left(fv!row.transit_agency_name, 10) & "..."
/*link: a!dynamicLink(*/
/*value: false,*/
/*saveInto: local!showPartial*/
/*)*/
),
a!richTextItem(
text: " "
),
a!richTextIcon(
icon: "expand",
caption: "Expand - " & fv!row.transit_agency_name,
link: a!dynamicLink(
value: false,
saveInto: local!showPartial
),
linkStyle: "STANDALONE"
)
}
),
a!richTextDisplayField(
value: {
a!forEach(
items: index(
local!vanpoolTransitAgencies,
wherecontains(
fv!row.vanpool_id,
index(
local!vanpoolTransitAgencies,
"vanpool_id",
{}
)
),
{}
),
expression:
{
a!richTextItem(
text: fv!item.transit_agency_name,
link: a!recordLink(
recordType: cons!RECORD_TYPE_TRANSIT_AGENCY,
identifier: fv!item.transit_agency_id
)
),
if(
not(fv!isLast),
a!richTextItem(
text: "; "
),
{
a!richTextItem(
text: " ",
showWhen: local!rowTrasitAgencyCount > 1
),
a!richTextIcon(
icon: "compress",
caption: "Collapse",
link: a!dynamicLink(
value: true,
saveInto: local!showPartial
),
linkStyle: "STANDALONE",
showWhen: local!rowTrasitAgencyCount > 1
)
}
)
}
)
}
)
)
)
),

Interface B column code:

a!gridTextColumn(
label: "Transit Agency",
field: "transit_agency_name",
data: apply(
rule!APN_replaceNull(_, " "),
index(local!datasubset.data, "transit_agency_name", {})
),
links: apply(
a!recordLink(
recordType: cons!RECORD_TYPE_TRANSIT_AGENCY,
identifier: _
),
index(local!datasubset.data, "transit_agency_id", {})
),
)

  Discussion posts and replies are publicly visible

Parents
  • A) When posting lengthy SAIL code like this, for sanity's sake and readability sake, please use the "Insert Code" functionality (Insert --> Insert Code), as this retains formatting like indentation as well as preventing code from stretching the post to unreadable extents.

    B) a!gridTextColumn() is the style used in the deprecated version of a!gridField, replaced since Appian 19.2 -- you should work to migrate any such grids to the newer version as it's better with better features and functionality.  Is there any particular reason you can't do that for the grid in this case?

Reply
  • A) When posting lengthy SAIL code like this, for sanity's sake and readability sake, please use the "Insert Code" functionality (Insert --> Insert Code), as this retains formatting like indentation as well as preventing code from stretching the post to unreadable extents.

    B) a!gridTextColumn() is the style used in the deprecated version of a!gridField, replaced since Appian 19.2 -- you should work to migrate any such grids to the newer version as it's better with better features and functionality.  Is there any particular reason you can't do that for the grid in this case?

Children