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
8 replies
Subscribers
10 subscribers
Views
2853 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
I want to show the contents of a folder on record dashboard so that all the docu
simranjits
over 10 years ago
I want to show the contents of a folder on record dashboard so that all the documents in the folder are available as a link.
Tried using getdocumentsfromfolder() but think it doesn't work on SAIL. Please suggest....
OriginalPostID-99359
OriginalPostID-99359
Discussion posts and replies are publicly visible
0
Tim
Certified Lead Developer
over 10 years ago
That function should return an array of documents ids so you then need to either construct a grid or list of link fields. Look at the a!applyComponents function recipes.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 10 years ago
That function should return an array of documents ids so you then need to either construct a grid or list of link fields. Look at the a!applyComponents function recipes.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
simranjits
over 10 years ago
I tried various alternatives but in vain. Can you please confirm if the current usage is correct:
a!linkField(
label: "ABC",
links: {a!applyComponents(
function: fn!a!documentDownloadLink
array: 1 + enumerate(length(getdocumentsfromfolder(rf!XXX_fol,true()))))})
where XXX is the folder from where documents needs to be picked.
I am getting the following error:
Invalid function a!linkField (not available as [])
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 10 years ago
What version are you using? a!applyComponents and a!documentDownloadLink are only available in 7.4
This will work for you:
a!linkField(
label: "Documents",
links: a!applyComponents(
function: a!documentDownloadLink(
document: _,
label: "Download"),
array: getdocumentsfromfolder(cons!IMAGE_DIR, true)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
simranjits
over 10 years ago
My mistake. I was looking at 7.4 documentation. I have Appian 7.3 with me.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 10 years ago
Ok, in 7.3 you just need to use the standard apply() function but build your own rule in place of a!documentDownloadLink that builds your URL: http://<SERVER_AND_PORT>/suite/doc/ri!docId
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rayudua
over 10 years ago
Tim, when i tried this i dont get results, what is the _, mean after document: will it loop taking the value for array list
a!linkField(
label: "Documents",
links: a!applyComponents(
function: a!documentDownloadLink(
document: _,
label: "Download"),
array:rf!generatedDocumentList
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rayudua
over 10 years ago
I just see the word document, but the label: part its no parsing the name. _ does not seem to work in label: but it works in document : _ , when i click it downloads 2 different docs as per the docIds, i want to show the name of the file.
=a!linkField(
label: "Documents",
links: a!applyComponents(
function: a!documentDownloadLink(
document: _,
label:document(_,"name") ),
array: {5262,5258}
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel