13
Views
4
Comments
Solved
Cycling through records in an entity
Question

I am trying to cycle through the records in an entity.  I have done the before successfully in another part of the application.  The only difference is in this case the form is in a modal widget.  In the other case it is in a table widget.  If this is not possible in a modal widget then I will find a work-around. 

Does anyone know if this can be done in a modal widget or am I doing something wrong?

The buttons are AjaxRefresh actions.

This is a traditional web application.

Rank: #66
Solution

Hi Leon,


The Form needs to be explicitly bound to the values, that's why it works with Table and not with Form.

Right before the AJAX Refresh and after the Refresh Query, add an assign where you set the Form.Record = output of the query.

In your case, it is this assign, both on the NextTreatment and PreviousTreatment actions:



Hope it helps.

Cheers,

João

Rank: #258

Can you share oml/oap for better understanding

Rank: #3683

The screen is called "Patient Interview".

When I click the Previous button I want it to display the previous record from the entity, and visa-versa when clicking the Next button.

HandsOnTherapy.oml

Rank: #66
Solution

Hi Leon,


The Form needs to be explicitly bound to the values, that's why it works with Table and not with Form.

Right before the AJAX Refresh and after the Refresh Query, add an assign where you set the Form.Record = output of the query.

In your case, it is this assign, both on the NextTreatment and PreviousTreatment actions:



Hope it helps.

Cheers,

João

Rank: #3683

Thank you.  That solves the problem.