Forum Discussion
MarkShnier__You
3 years agoQrew Legend
I would just land the user on an alternate mini form with 2 buttons, and forget the code page. Do you know how to specify an alternate for in a URL with &dfid=10, where 10 is the alternate form #?
URLRoot() & "db/" & dbid() & "?a=dr&dfid=10&rid=" & [Record ID#]
​
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
URLRoot() & "db/" & dbid() & "?a=dr&dfid=10&rid=" & [Record ID#]
​
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- ChrisSwirtz33 years agoQrew MemberHey Mark,
Thanks for this! It actually worked great, for the most part anyway. I created a button to go on the form and on the reports on the home page that takes the user to that alternate form I created which displays the warning message that says to either continue cancellation by clicking the cancel button below or to click on your home button. Might add another button to take them back to edit mode on the main form so they can continue working if they want. The problem I run into is the Cancel button the Cancellation form is setup to change the Status field and then navigate to the Home Page. But in order to change the Status field it needs to look for the Record ID, which is not available when Adding a new record. Clicking the button to take the user to the Cancellation page does save the record first before opening the next Form, but the Cancellation form opens in Add mode versus Edit mode of the record that was just created. Any ideas on how to modify this option so it works in Add mode too?
------------------------------
Chris Swirtz
------------------------------- MarkShnier__You3 years agoQrew LegendCan you post your code for the cancel button?
Are you asking for the cancel button to work in Add Mode? Like a user would be adding a record in cancelled Status?
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- ChrisSwirtz33 years agoQrew MemberHey Mark,
This is the code to get the user to the "Cancel Form"
URLRoot() & "db/" & Dbid() & "?a=er&dfid=81&rid=" & [Record ID#]
And this is the code for the actual "Cancel" button on that form.
URLRoot() & "db/" & Dbid()
& "?a=API_EditRecord"
& "&rid=" & [Record ID#]
& "&_fid_1161=Cancelled"
& "&rdr="
& URLEncode(URLRoot() & "db/bsd4f85xs")
Which works perfectly when they are working with a record that has been saved and has a Record ID. However, when adding a new record, there is no Record ID established yet. Now, when I click on the button to navigate to the Cancel Form from a new unsaved record, it does save the record first because I have the setting turned on to do so, but when it opens the Cancel Form, it remains in "Add" mode and doesn't capture the Record ID that was created when it saved and navigated to the other form. It's almost as if the formula needs to save the record and reopen it as is then run the code to navigate away so the new form so it reads the Record ID at that point.
------------------------------
Chris Swirtz
------------------------------