Forum Discussion

MichelleCraig's avatar
MichelleCraig
Qrew Member
2 years ago

Submit button error

currently i have buttons that will work if i save the record and go back into the form, but i want to be able to change field ID 79's status to pending review when one hits submit WITHOUT having to hit save & keep working (or exit or new) 

this is what i am working with for my submit button, i have removed my app token for security reasons. 

"<a class=\"Vibrant Primary SaveBeforeNavigating\" width:310px; text-align: center;\" href='" & URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&apptoken=you wish you knew &_fid_79=Pending Review&rdr=" & URLEncode(URLRoot() & "db/" & Dbid()) & "'>Submit</a>"

this is the error that i am getting:

thanks in advance for helping me!



------------------------------
mcraig0127
------------------------------

14 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger

    Not tested, but try this

    var text RID = If([Record ID#] > 0, ToText([Record ID#]), "%%rid%%");

    // the %%rid%% is a special symbol which will be replaced by the value of the 

    // Record ID# when the SaveBeforeNavigating happens. 

    var text Edit =  URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & $RID & "&apptoken=you wish you knew&_fid_79=Pending Review";

    var text DisplayURLMissingRID = URLRoot() & "db/" & Dbid() & "?a=dr&rid="; 

    var text URL = $Edit

    & "&rdr=" & URLEncode($DisplayURLMissingRID) & $RID;

    // note that the %%rid%% does not like being URLEncoded!

    "<a class=\"Vibrant Primary SaveBeforeNavigating\" width:310px; text-align: center;\" href='" & $URL  & "'>Submit</a>"



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------

    • MichelleCraig's avatar
      MichelleCraig
      Qrew Member

      I keep getting this message, even after placing a semi-colon -

      A variable declaration must end with a semi-colon.

      and it is referring to this portion:

        "<a class=\"Vibrant Primary SaveBeforeNavigating\" width:310px; text-align: center;\" href='" $URL  & "'>Submit</a>"

      thanks for being awesome!



      ------------------------------
      Michelle Craig
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew #1 Challenger

        This line here needs a semi colon at the end after the RID.  I will also fix my original post.

        var text URL = $Edit

        & "&rdr=" & URLEncode($DisplayURLMissingRID) & $RID;



        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------