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
12 replies
Subscribers
6 subscribers
Views
3996 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
#Document in PagingGrid We have a requirement to show data in paging grid a
shivakanthr
over 10 years ago
#Document in PagingGrid
We have a requirement to show data in paging grid along with document link.
when I am showing data(fetching from DB) in the Paging grid it only shows document id. How to show the document as attachment in the paging Grid , I tried to use todocument and linktodocument function but the document link is not displayed. I am working on v7.3
Thanks in advance
OriginalPostID-147939
OriginalPostID-147939
Discussion posts and replies are publicly visible
0
sikhivahans
over 10 years ago
Hi Please refer components at
forum.appian.com/.../SAIL_Components
and
forum.appian.com/.../SAIL_Components
.
AFAIK combination of the above mentioned components and apply() function should work when you are configuring the corresponding column in the paging grid component.
Please do let me know if you have any questions. If you aren't able to resolve the issue, upload the code snippet so that Appian practitioners here can take a look at it and make suggestions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
Please refer the following link first (apply function should be used in combination to generate array of links) and then switch to above content if you are not able to resolve with help of this:
forum.appian.com/.../SAIL_Components
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nileshr
over 10 years ago
Try using the following method.
Create 2 rules for generating the document name and a download link for a given document Id.
Let's say rule!GetDocumentName as
document(
ri!DocumentId,
"name"
)
and
rule!GetDocumentLink as
a!documentDownloadLink(
document: ri!DocumentId,
label: document(ri!DocumentId,"name")
)
Now, in your grid use the following code snippet.
a!gridTextColumn(
label: "Document",
field: "documentId",
data: apply(
rule!GetDocumentName,
index(
local!DataSubset.data,
"documentId",
{}
)
),
links: apply(
rule!GetDocumentLink,
index(
local!DataSubset.data,
"documentId",
{}
)
),
alignment: "LEFT"
)
Here "documentId" will be your CDT field for document Id.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
@shivakanthr This is how your column should look like as far as you are on 7.3:
a!gridLinkColumn(
label: "Link to document",
data: {
apply(
a!safeLink(
uri: _,
label: _
),
merge(
apply(
rule!APN_getDocUrl,/*Rule is from Appian common objects*/
{
}
),
apply(
fn!document(
_,
"name"
),
{
}
)
)
)
}
)
Attached an example as well for the reference.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
*as long as
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shivakanthr
over 10 years ago
Hi all thanks for quick reply.
The same code works If the form is Tempo form (not SAIL firm). If not, how do we display document link.
Ex. I drag and drop Paging grid component in the user input task
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
@shivkanthr May I know if you are trying to achieve the link to document on tempo form (Form designed with 'Forms Designer' and 'Enable support for mobile clients and additional web browsers (some components will not be available)' checkbox enabled) ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shivakanthr
over 10 years ago
Yes sikhivahan
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
@shivkanthr AFAIK this doesn't seem to be doable. Many forum conversations convey the same as well (for instance,
forum.appian.com/.../e-88215
is one of them).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandhinir
over 10 years ago
Hi Shivakanth,
Please find the attached code to display the links in the Paging Grid.
LinkInPagidGrid_code.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>