Form and DataGrid2 on same Page, save Form data and create new object without reload?

0
Hi,  I try to do the following.   I have a Form on top of a Page and a DataGrid2 at the bottom. Both (Form and Datagrid2 use the same entity. The form to save the item, the Datagrid2 to show the list of generated items (or to delete them is necessary).   I build Microflow to commit the form data to the database (entity) with click on the Save button which works well. I can also see the generated new item in the DataGrid2 below. Check! Perfect!   BUT how do I get the Form "cleared" to create the next item without reloading the page (create a new object and pass it to the form, again). I tried to create a Microflow that commits the form, creates a new object and passes the new object again to the form (Refresh in Client) . But this does not work. Instead the form stays showing the just created data and any changes just change the item.   I would expect to somehow (from the microflow) show the NEW object in the form. Any ideas how to realize it? There must be a way as with the "Listen to widget" feature in the form the form can listen to any object change in the list and show other objects without reload.    My Test Page:   My Microflow:      
asked
2 answers
1

Hi Timo, 

This can be achieved easily with the help of a Non-persistable entity on a page. 

Create a nonpersistable entity that looks similar to your persistable entity and use the same in your form. 

When you click on save, create a new persistable object and commit to the database. Empty the fields in the nonpersistable object while saving the form so that you can use the same nonpersistable object to create a new object again. 

answered
1

You made my day :-) 

 

In addition I changed the actualize interval in the DataGrid2 to 1 second and it works exactly as needed.

 

image.png

image.png

answered