Hi,
I found a code that explain how to display files in a grid, but my problem is that I can't create new columns with more information, for example the Description of the file. Please, can you give an advice?
This is my currect code. Thanks a lot.
load( local!data: { { id: 1, folderId: 4768/* Folder ids*/ }, { id: 2, folderId: 4947/* Folder ids*/ } }, a!gridLayout( label: "Documentación", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell( label: "Nombre documento" ) }, 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: char(10), showWhen: not( fv!isLast ) ) } ) ) ) ) }, selectionSaveInto: {}, validations: {}, shadeAlternateRows: true ) )
Discussion posts and replies are publicly visible
José Manuel Ojeda said:but my problem is that I can't create new columns with more information
Can you please elaborate.
When I write a new a!gridLayoutHeaderCell and I map a!richTextDisplayField inside the content of my a!gridRowLayout I recieve this error:
load( local!data: { { id: 1, folderId: 4768/* Folder ids*/ }, { id: 2, folderId: 4947/* Folder ids*/ } }, a!gridLayout( label: "Documents", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell( label: "Name" ), a!gridLayoutHeaderCell( label: "Description" ) }, 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: char(10), showWhen: not( fv!isLast ) ) } ) ), a!richTextDisplayField( value: a!forEach( items: folder( index( fv!item, "folderId", {} ), "documentChildren" ),/*Getting documents from folder*/ expression: { a!richTextItem( text: document( fv!item, "description" ) ), a!richTextItem( text: char(10), showWhen: not( fv!isLast ) ) } ) ) ) ) }, selectionSaveInto: {}, validations: {}, shadeAlternateRows: true ) )
I don't think you would need another forEach in your line 92 if I am right. because you are already doing it for the gridRowLayout. But are you trying to show multiple details in a single row?