Forum Discussion
BrianSeymour
3 years agoQrew Assistant Captain
I'm not totally tracking the issue, but your button is just opening a record in edit mode vs. displaying the record (the url query string contains a=er vs. a=dr), so it seems like the record is just reloading without saving changes, right?
Have you reviewed the Table Advanced Settings to ensure the "Auto save when redirected away from the page" box is checked?
Also, it sounds like you are aware, but on the Form level (not Table level) we can control button visibility via the "Show Save & close and Cancel buttons at the end of this form" and "Show save & keep working choice" boxes. So an alternative solution may be to create a separate form and assign this form as the default for Users in certain Roles. You can point the Users in a given form using the dfid=[YourFormID] query string parameter and in the Form UI to use the native QB controls. I'm not sure that's a feasible option in your use case, but wanted to throw it out there!
See attached screenshots.
------------------------------
Brian
------------------------------
Have you reviewed the Table Advanced Settings to ensure the "Auto save when redirected away from the page" box is checked?
Also, it sounds like you are aware, but on the Form level (not Table level) we can control button visibility via the "Show Save & close and Cancel buttons at the end of this form" and "Show save & keep working choice" boxes. So an alternative solution may be to create a separate form and assign this form as the default for Users in certain Roles. You can point the Users in a given form using the dfid=[YourFormID] query string parameter and in the Form UI to use the native QB controls. I'm not sure that's a feasible option in your use case, but wanted to throw it out there!
See attached screenshots.
------------------------------
Brian
------------------------------
MarkShnier__You
Qrew Legend
3 years ago@Christopher Greene
The SaveBeforeNavigating syntax is known to fail i.e. (causing that pop up) if the only change to the record was In Grid Edit. I have found that it works reliably if the Parent record is changed. What I finally settled on which works perfectly is to make to helper fields on the form. One is called [Dirty the record] and the other one is called [Dirty the record plus 1]. The latter is a formula field obviously equal to
[Dirty the record] +1`
I then have a form rule set to fire all the time where if those two fields are not equal I change [Dirty the record] to be equal to the value in the field [dirty the record plus 1].
In your post above you are claiming that save before navigating fails even if both the parent and the child have been modified. In my experience that is not how it behaves. Try putting in that form rule and see if it solves the problem.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
The SaveBeforeNavigating syntax is known to fail i.e. (causing that pop up) if the only change to the record was In Grid Edit. I have found that it works reliably if the Parent record is changed. What I finally settled on which works perfectly is to make to helper fields on the form. One is called [Dirty the record] and the other one is called [Dirty the record plus 1]. The latter is a formula field obviously equal to
[Dirty the record] +1`
I then have a form rule set to fire all the time where if those two fields are not equal I change [Dirty the record] to be equal to the value in the field [dirty the record plus 1].
In your post above you are claiming that save before navigating fails even if both the parent and the child have been modified. In my experience that is not how it behaves. Try putting in that form rule and see if it solves the problem.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- ChristopherGre33 years agoQrew TraineeMark,
Your provided solution works great when only the embedded child records themselves are edited when the main parent record is not necessarily changed.
Thank you for the helpful tip. Much appreciated.
CGreene
------------------------------
Christopher Greene
------------------------------ - ChristopherGre33 years agoQrew Trainee.... But, if I click the table button or any other button, since those two helper fields are constantly changing, then I'll have to respond to the popup that warns of unsaved fields, specifically the two helper fields. The Save & Close button takes me out, but that is an option that I would hide from the end user with &ifv=1 in the query string. Anyway, I'm further along with the solution than I was yesterday.
Thanks again,
CGreene
------------------------------
Christopher Greene
------------------------------- MarkShnier__You3 years ago
Qrew Legend
Yes, I have no way to stop that pop up when you navigate away, as the record is now dirty. You would think because the table is set to auto save before navigating away that it would not do that though.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- ChristopherGre33 years agoQrew TraineeYes, and I do have that set in the table properties. In fact I think tables default to that.
CGreene
------------------------------
Christopher Greene
------------------------------