Forum Discussion
I will try answering rom the back of a van in Vietnam. Have WiFi, Will Travel.but only have ipad access now
the SaveBeforeNavigating functionality should work for you. It only works as a Formula Rich Text field Type, not Formula URL.
var text RID = "%%rid%%";
var text AddShipment = URLRoot() & "db/" & Dbid() & "?act=API_GenAddRecordForm ........
var text EditShipment = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord"
& "&_fid_99=Unsubmitted"
& "&rid=";
var text DisplayShipment = Urlroot() & "db/" & dbid() & "?a=dr&rid=";
var text URL =
$AddShipment
& "&rdr=" & URLEncode($EditShipment) & $RID
& URLEncode("&rdr=" & URLEncode($URLTHREE)) & $RID
"<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #4b7097; border-radius: 5px; color: #ffffff; display: inline-block; padding: 0px 0px 0px 0px; width:100px; text-align: center; text-shadow: none; border: 2px solid #030404; font-size: 12px \"href='"
& $URL
& "'>Save and Display</a>"
NOTE: The %%RID%% does not seem to like being URLEncoded.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
Hi Mark - I actually didn't see your reply until last week. Code you provided solves half my problem
workflow 1
1. user clicks a button on a report line
2. button does the api_genaddrecord form, opens form (this works, no issues)
3. user fills in data and clicks 'submit' custom button on form
4. submit button uses API_EditRecord&rid to chnage some fields & save (this works using code above) then user redirects user to originating report (not working)
workflow 2
1. user edits existing record
2. user fills in data and clicks 'submit' custom button on form
3. submit button uses API_EditRecord&rid to modifiy some data and redirects user to originating report (not working)
Issue:
this is where I'm stuck. code above saves the record and redisplays the form. I want to go back to originating report, which can vary. Code above redisplays the form after save. I want to hide the save and close button. trying to make the edit/close/return be one action
There are multiple submit buttons which i show/hide based on the state of the record. And of course, user can navigate to the form from multiple reports. Right now I'm forcing them back to the table home report. so they then have to go back to the report they were using (work queue, exction report, etc).
Thoughts?
------------------------------
Cathy Wilbur
------------------------------
- MarkShnier__You2 years agoQrew Legend
So this is the problem
"I want to go back to originating report, which can vary."
Sorry, I can't think of a way to remember the qid of the report to go back to. You could try appending this
& "&z=" & Rurl()
in place of the rdr=, but I doubt it will work.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- CathyWilbur2 years agoQrew Member
correct, tried that and it does not work. thanks for the help
------------------------------
Cathy Wilbur
------------------------------