How to Display view button based on data present inside the data grid?

0
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! 
asked
2 answers
1

Hi, 

You can acheive it  by following this approach.

  1. First create a Non persistable entity with boolean attribute. 
  2. Now place the two datagrid with one is having view button and other datagrid without having view button. 
  3. Add the visibility condition with boolean atribute. 
  4. For example IsDataExist , When this is true enable the datagrid with view button else enable the other datagrid
  5. 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

 

 

answered
0

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.

answered