How to Display view button based on data present inside the data grid?
Hi All, I have a requirement that I have to display the view button only if there are any data's present inside the data grid. If there is no data inside the data grid. The view button should not be displayed in the data grid. Note: I'm using xpath in the data grid. So I can't able to use visibility based on attribute. Answers are really much appreciated!
You can acheive it by following this approach.
First create a Non persistable entity with boolean attribute.
Now place the two datagrid with one is having view button and other datagrid without having view button.
Add the visibility condition with boolean atribute.
For example IsDataExist , When this is true enable the datagrid with view button else enable the other datagrid
To open this page, create a microflow which create a object for Nonpersistable entity and add retrieve action for the entity which has same xpath constraint. If data exist , update the boolean to true or make it as false if no data exist. Now page will be opened with one datagrid based on the boolean attribute
Hope this helps you well
You could use the , show by condition, widget and create a microflow that checks the same xpath. If list returns empty, give it a false output and the button will be hidden.