Celebrate

Example of SaveBeforeNavigating

  • 1.  Example of SaveBeforeNavigating

    Posted 04-19-2021 18:29
    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
    ------------------------------