View Button Process

Hi all, we have a own application if a new customer login to the application there will be new button and view button ,once the form is filled the view button should be visible if not it should not be visible to the new  customer. can someone suggest the idea, Thanks in advance.      
2 answers

Hi Keerthana, 

  1. Create a Non persistable entity with the any boolean attribute.
  2. Place the two datagrid inside the dataview which connected to Non persistable entity.
  3. Your one datagrid should have view and new  button
  4. Other datagrid should have only new button.
  5. Hide the datagrid based on the boolean attribute present in NonPersistable entity.
  6. For example keep boolean attribute name IsFormFilled. And Enable Datagrid which has new & view button when IsFormFilled attribute becames true if it false enable the datagrid which has only new button
  7. When user fills the form update the IsFormFilled boolean to true otherwise it should be false.
  8. If you follow this approach, then you can hide view button when user is not filled the form

This is one way to accomplish that:

  • Add an additional boolean attribute to MyEntity: IsFilled, default false
  • Create a validation-nanoflow (Val_MyEntity) that validates if the form is filled or not, setting MyEntity.IsFilled to true or false. Make sure it is a lightweight nanoflow, taking only 10millisec or so to complete.
  • Trigger Val_MyEntity every time one of the form's attributes has changed.
  • Set visibility on the View-button based on attribute MyEntity.IsFilled