Discussions

Expand all | Collapse all

Need Help With First Button Attempt

  • 1.  Need Help With First Button Attempt

    Posted 17 days ago
    As stated before, I just started working in Quick Base and I'm having trouble with my first attempt at a button.  The label is showing, but not as a button.  I am trying to check an checkbox and update a status field when the button is pressed.  The conditions in the if statement are validating the form data to ensure that at least one service is on the order, that all of the subscribed services are verified and that there are no reported issues.  I am guessing there are multiple issues, please be kind.

    var text URLAPPROVE = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Record ID#] &
    "&_fid_274=1";

    var text URLCOMPLETE = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Record ID#] &
    "&_fid_18=Completed";

    var text URLCOMPLETEISSUES = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Record ID#] &
    "&_fid_18=Completed With Issues";

    If([Has Service] and [Is Verified] and [NoIssues],$URLAPPROVE & URLEncode($URLCOMPLETE) & Rurl(),
    If([Has Service] and [Is Verified] and not [NoIssues], $URLAPPROVE & URLEncode($URLCOMPLETEISSUES) & Rurl()))

    I would also like to know how to include the code below to return to the previous location after the button is pressed:

    "javascript:" & "$.get('" & $url & "', function(){" & "location.reload();" &
    "});" & "void(0);"

    ------------------------------
    Paul Peterson
    ------------------------------


  • 2.  RE: Need Help With First Button Attempt

    Posted 17 days ago
    You should not be editing the same record twice or you will not be able to refresh to the page as easily,

    So calculate the URL like

    var text URLAPPROVECOMPLETE = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &

    "&rid=" & [Record ID#] &
    "&_fid_18=Completed"
    "&_fid_274=1";


    var text URLAPPROVECOMPLETEISSUES = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Record ID#] &
    "&_fid_18=Completed With Issues"
    "&_fid_274=1";


    var text URL =If(
    [Has Service] and [Is Verified] and [NoIssues],$URLAPPROVECOMPLETE,
    [Has Service] and [Is Verified] and not [NoIssues], $URLAPPROVECOMPLETEISSUES)


    "javascript:" & "$.get('" & $url & "', function(){" & "location.reload();" &
    "});" & "void(0);"





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



  • 3.  RE: Need Help With First Button Attempt

    Posted 17 days ago
    also if it is not appearing as a button , then check the checkbox to show as button.

    Display as a button on forms and reports

    and select a colour

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



  • 4.  RE: Need Help With First Button Attempt

    Posted 17 days ago

    Thank you!

    I'll create a test field since the project owner changed direction on the field but I do want to test the button.  

    I appreciate your help!

    Regarding the button appearance, the display as button was checked.



    ------------------------------
    Paul Peterson
    ------------------------------



  • 5.  RE: Need Help With First Button Attempt

    Posted 17 days ago
    ohhh, didn't see the on form and reports.  I'll double check

    ------------------------------
    Paul Peterson
    ------------------------------