Discussions

Expand all | Collapse all

Button that can change a field and then go to edit mode

  • 1.  Button that can change a field and then go to edit mode

    Posted 24 days ago
    Edited by Endy Lu 24 days ago
    I have a declined button where when you press it, the status will be changed to declined. However, I put in a rule where a status cant be declined without a decline reason. Currently, when the button is pressed it will bypass my rule.  Is there any way I can make my button change the status to declined and then go to edit mode, so I can choose a decline reason?

    ------------------------------
    Endy Lu
    ------------------------------


  • 2.  RE: Button that can change a field and then go to edit mode

    Posted 24 days ago
    Can you post the code for your button and then I will add the extra code to land the user in edit mode?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 3.  RE: Button that can change a field and then go to edit mode

    Posted 24 days ago
    sure thing, this is my code

    var text Declined = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=dghxdxrc9kgh4qbn746c7dje9wds&rid="&[Record ID#]&"&_fid_6=Declined";

    "javascript:{"&
    "fetch('"& $declined &"');"&
    "location.reload('"& $Declined &"');"&
    "}"

    ------------------------------
    Endy Lu
    ------------------------------



  • 4.  RE: Button that can change a field and then go to edit mode

    Posted 24 days ago
    Try this. The only issue will be where you want to land the user after the record is saved. 

    var text Declined = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=dghxdxrc9kgh4qbn746c7dje9wds&rid="&[Record ID#]&"&_fid_6=Declined";

    var text EditMode = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID#];

    $Declined
    & "&rdr=" & URLEncode($EditMode)

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 5.  RE: Button that can change a field and then go to edit mode

    Posted 24 days ago
    awesome thanks, Mark! It works

    ------------------------------
    Endy Lu
    ------------------------------