Hi All,
I am using selectables in read-only grid, based on the selected row I need to show a value in a particular column. In editable grid, we can configure the readonly as not(contains(ri!selectionList,fv!index)). But how to check whether the current row is in the selected list. How to get the row id in read-only grid?
Discussion posts and replies are publicly visible
Documentation says that the grid stores the ID.
https://docs.appian.com/suite/help/21.2/read-only-grid-configuration.html#selection
Something like this should do it. Copied you snippet.
not(contains(ri!selectionList,fv!row.id))
Hi Stefan, actually in a paging grid, for data as a data subset, the data subset identifier gets stored as the selection value.
I have a date column, which is initially not visible. But as soon as a row is selected the entire date column becomes visible and not only the specific row date. Any idea?
Would need to see at least some code snippets. What is the field name of your primary key? That must be used in contains().
a!gridColumn( label: "DOA", sortField: "DOA", value: fv!row.DOA, showWhen: /*fv!row does not have scope here */ , align: "END"
)
This is the column that needs to be displayed for the selected row. But under showWhen fv!row cannot be used.
the primary key is PRN, fv!row.PRN
Hi Saahil Mulla,
You should be applying the condition in the 'value' parameter, not in the 'showWhen' parameter to show value based on the selection.
a!gridColumn( label: "DOA", sortField: "DOA", value: if( contains(ri!selectionList, fv!row.PRN), fv!row.DOA, "Hidden" /*Instruction text as per your preference*/ ), align: "END" )
The 'showWhen' part can be configured based on the selection if needed for your requirement.
Hi Selva,
Thanks, it's working
ShowWhen will show/hide the whole column but not individual fields.
Yes, got that. Thanks