Hi folks,
I need to display multiple files stored in a particular folder in a grid on an interface.
Any help will be appreciated. TIA.
Discussion posts and replies are publicly visible
Hi apoorvam
Please find the below code just replace it with valid folder ids.
load( local!data: { { id: 1, folderId: 5180/* Folder ids*/ }, { id: 2, folderId: 7366/* Folder ids*/ } }, a!gridLayout( label: "Editable Grid", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell( label: "Header Cell" ) }, columnConfigs: {}, rows: { a!forEach( items: local!data, expression: a!gridRowLayout( id: fv!index, contents: a!richTextDisplayField( value: a!forEach( items: folder( index( fv!item, "folderId", {} ), "documentChildren" ),/*Getting documents from folder*/ expression: { a!richTextItem( text: document( fv!item, "name" ), link: a!documentDownloadLink( document: fv!item ) ), a!richTextItem( text: " ", showWhen: not( fv!isLast ) ) } ) ) ) ) }, selectionSaveInto: {}, validations: {}, shadeAlternateRows: true ) )
Regards,
Sachin