Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
2922 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I have a grid using a!gridField which contains a link column. For some of the ro
shaoyongw
over 9 years ago
I have a grid using a!gridField which contains a link column. For some of the rows, the link needs to be hidden. I tried to use following code but the broswer crashs when testing.
a!gridTextColumn(
label: "Name",
data: ri!data,
links: apply(fn(x), ri!data)
)
fn(x): if(isnull(x), null, a!dynamicLink(...))
Instead, if set the link value directly it will work. Any suggestion?
a!gridTextColumn(
label: "Name",
data: ri!data,
links: {null, a!dynamicLink(...), ...}
)
OriginalPostID-139989
OriginalPostID-139989
Discussion posts and replies are publicly visible
0
radhaa
over 9 years ago
Hey shaoyong,
create a support rule as
if(
rule!APN_isEmpty(
ri!value
),
null,
a!dynamicLink(
value: ri!value,
saveInto: ri!save
)
),
and use that rule in apply function in links parameter. see sample code
Test
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shaoyongw
over 9 years ago
hi radhaa, your method is the same as mine. I also tried your method which got same error. The interface UI is crashed because of below error:
Unrecoverable Error
An unrecoverable error was encountered while processing your request. To prevent losing your work, copy the expression below before reloading your browser.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shaoyongw
over 9 years ago
And the Appian version is 7.6.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jorgea272
over 9 years ago
I think if you do this isNull evaluation on the data parameter instead of the links parameter you should be able to hide links in a grid. Ultimately if there is no text value in that grid cell, there will be no link. Here is an example that checks the text array, if the value in that text array is null it will be "" otherwise it will say "Click Here":
a!gridTextColumn(
label: local!datasubset.columns[5].label,
field: local!datasubset.columns[5].field,
data: if(
apply(
rule!notNullOrBlank,
local!datasubset.data[5].cells.value
),
"Click Here",
""
),
alignment: "CENTER",
links: fn!apply(
a!documentDownloadLink(
label: "",
document: _
),
local!datasubset.data[5].cells.value
)
),
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rupeshc
over 9 years ago
Hi shaoyongw ,try using {} instead of "null". Forexample: fn(x): if(isnull(x), {}, a!dynamicLink(...))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel