How to add rows directly in the data grid2 foreground instead of adding empty objects to the database

0
As shown in the figure, I can add empty objects directly to the database to add new rows         How to add rows directly in the data grid2 foreground instead of adding empty objects to the database  
asked
2 answers
1

Hi Zeng,

You have to write the custom logic for this.

take an attribute isActive(false)

When you are committing your empty objects please pass there isActive as false -> go to your dataGrid2 retrieve your data in the xPath pass this [isActive=false] -> add your multiple rows as many you want -> After adding on OnSubmit button make a microflow -> in the microflow retrieved your entity in the xpath isActive=false now take a loop pass this list and change the object & change the isActive as true -> now you have correct in DB now when you will show the data at any page in the xpath use isActive=true.

 

On OnCancel button make a microflow -> in the microflow retrieve your entity in the xpath isActive=false & delete the listOfObjects & close the page, So in the DB you don’t have any empty value.

 

Hope you like the answer 

answered
1

ZengHong,

If you add the rows:

  • with a microflow and do not commit the object or
  • with a nanoflow and do not commit the object

it will be created in the client but not the database.  The new object will not be created in the database until it is committed.

Hope that helps,

Mike

answered