Main Region

Force changes to save in master
1 answer | 187 views

Profile Image
Nov 23, 2014 22:37 +00:00

The form is the master with detail grid. I am trying to make sure that they can't add a detail unless the form changes have been saved.

I added the "Alert for changes" to the create button for the grid. The alert displays but it still creates a new row in the grid, which I would like to stop. Now I thought I had an idea. I remove the database action from the button and assign a dynamic action which has on the True to check for updates on the form and a False to create a new row in the grid. But I can't find how to create a new row for a grid. I suspect there is a better way if doing this...

The other related question I have is is it possible to do a Save on a Form. I did find the save for a grid, but there seems to be none for a Form.

1 comment

Profile Image
Ray Nov 24, 2014 13:00 +00:00 

Option 3 sounds like a plan. Thanks.

MN
Nov 24, 2014 12:31 +00:00

You have a number of options such as:

  1. Hide the grid until the master form is loaded.
  2. Disable/enable grid buttons based on the form primary key page item change event. When the value is NULL disable the buttons, when not enable.
  3. Use a single save button to save the form first with "Wait for Result" checked followed by a grid save action. i.e. your grid only has 1 button to add new rows. The save button is at the top of the page.

If you want to perform you own button dynamic action on a form by setting the "database action" to NULL, then the form save actions are located in the "FOEX Form Actions" dynamic action.

0 comments

You must log in or sign up to post questions and answers.