Hi,
I have a constant file (image below) with Text type and Array values, I am trying to populate readonly grid with this list and a checkbox next to each value. Please suggest how can we achieve this?
Discussion posts and replies are publicly visible
This should help you
https://docs.appian.com/suite/help/20.3/grid-with-selection-pattern.html
replace data array in line 25 with your constant.
I have started getting this error (below)
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!gridField [line 21]: Could not cast from Text to Map. Details: CastInvalidCould not cast from Text to Map. Details: CastInvalid
a!gridField( label: "Employee Directory", data: todatasubset( cons!ABC_List, fv!pagingInfo ), columns: { a!gridColumn( label: "Name", sortField: "name", value: fv!row.name ) }
You need to turn the list of strings into a list of maps.
a!gridField( label: "Employee Directory", data: todatasubset( a!forEach( items: {"a", "b", "c"}, expression: {name: fv!item} ), fv!pagingInfo ), columns: { a!gridColumn( label: "Name", sortField: "name", value: fv!row.name ) } )
This is working and you would want to replace the list in line 5 with your constant.
Thanks it worked!
One last thing, First row in the grid is empty for some reason, I already verified I don't have any space or just character because of which that first row would be showing empty.
You might want to make the data visible. Either in the interface or in a small test-expression. Then you can see what it exactly is. A paragraph field can do that. Make sure to replace the fv!pagingInfo by a custom paging info as it is only available inside the gridField.
Issue resolved
Thank You!