Skip to main content
Question

Example of SaveBeforeNavigating

  • April 19, 2021
  • 0 replies
  • 313 views

JimHarrison
Forum|alt.badge.img+16
Just came by to say it's verking! I am filled with so many happy's.

"Builders can now use a new CSS class (SaveBeforeNavigating) inside of a formula-rich text field so that Quickbase saves the record before navigating when this setting is used.

Note that only one of the above workflow classes is supported per formula-rich text."

Example code of a button:

var text btnName = If(Contains([Egnyte_Link_Text],""),"", If([Email Payroll Trigger],"Email Sent","Send Dispatch to Payroll"));
//URL
var text urlOne = If(Contains([Egnyte_Link_Text],""),"",If([Email Payroll Trigger], URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & URLEncode ([Record ID#]) & "&apptoken=&_fid_369=0&_fid_370=\"\"" & "&z=" & Rurl(), URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & URLEncode ([Record ID#]) & "&apptoken=&_fid_369=1&_fid_370=" & Today() & "&z=" & Rurl()));
var text urlTwo = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & URLEncode([Record ID#]);
var text url = $urlOne & "&rdr=" & URLEncode($urlTwo);
//Style
var text style = If(Contains([Egnyte_Link_Text],""),[styleGrey], If([Email Payroll Trigger], [styleGrey],[styleEdit]));
//Target
var bool popup = false;
var text target = If($popup = true, "target = _Blank ", "");
var text title = "Click button to send Dispatch to Payroll";
//*****DO NOT EDIT BELOW THIS LINE*****
//HTML
"<a class='SaveBeforeNavigating' title=\"" & $title & "\"style =\"" & $style & "\"" & $target & "href=" & $url & ">" & $btnName & "</a>"
//Syntax end


------------------------------
Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
------------------------------

Forum|alt.badge.img+14
Jim,

The other thing they implemented was 'Openaspopup'. I cannot get this to work. Have you tried, and if so do you know the syntax to add it? I tried 'class=Openaspopup' but that didn't work.... tried target='openaspopup' and that just opens it in a new window.

I'm trying to figure out the syntax, and even better, if we can control the size of the pop up

------------------------------
Mike Tamoush
------------------------------