Discussions

Expand all | Collapse all

Approval Button

  • 1.  Approval Button

    Posted 12-21-2018 18:52
    I know this has been asked many times before but I am trying to create a approve and deny button. I am using this code URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=eqfdujiwskwidvd3jphn866p&_fid_97=Approved&rid=" & [Record ID] & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?act=dr&rid=" & [Record ID])
    per this link https://community.quickbase.com/quickbase/topics/how-can-i-add-an-approve-or-reject-button-to-my-ema... but I am getting the following error. 

    <qdbapi>
    <action>API_EditRecord</action>
    <errcode>30</errcode>
    <errtext>No such record</errtext>
    <errdetail>Missing "rid" parameter.</errdetail>

    </qdbapi>

    I know for the code I need to change the api token to mine and the field ID to the correct field ID # but is there anything else that I need to change? It will not allow me to use [record ID] not sure what is suppose to go there. 


  • 2.  RE: Approval Button

    Posted 12-21-2018 18:57
    What is the field on your field list that has the Record ID?  
    is it called
    [Record ID#]
    or 
    [Record ID]  ?

    I think that you have a mixup there with a false field called [Record ID] which has no data in it or else has some other data in it.




  • 3.  RE: Approval Button

    Posted 12-21-2018 19:06
    thank you for the quick reply I have changed it to [record ID#] I do have that field but am still getting the same error. One the approve button is clicked I want it to be tracked at the approval status field which is ID #14


    Here is the record I am trying to approve



  • 4.  RE: Approval Button

    Posted 12-21-2018 19:54
    Can you post your code again and the error message?  And also, and this is a crazy question, but can you confirm that there is a value in that field [Record ID#] and the field ID # of that field is 3.

    I have never seen anyone create a field called [Record ID] before, so maybe you also renamed the real field which identified the Record ID.


  • 5.  RE: Approval Button

    Posted 12-21-2018 20:01
    When I added the record ID# field to the form the number 2 value comes up and the ID # is 3.  for background super little about coding and have a very basic knowledge of Quickbase. 

    Code is URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=*mytokenishere*&_fid_14approved&rid=" & [Record ID#] & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?act=dr&rid=" & [Record ID#])

    error is 
    <qdbapi><action>API_EditRecord</action>
    <errcode>30</errcode>
    <errtext>No such record</errtext>
    <errdetail>Missing "rid" parameter.</errdetail>

    </qdbapi>


  • 6.  RE: Approval Button

    Posted 12-21-2018 20:09
    Can you contact me via my website QuickBaseCoach.com and I will help you at no charge. Your formula should work.


  • 7.  RE: Approval Button

    Posted 12-26-2018 23:25
    So.  I was getting the same exact error.  I followed your steps & found out that when I try to use the button my [Record ID#] is actually blank.  I am using my buttons a selection before the record is actually created.  

    For example:
    1.  Click Add new service record
    2.  Select magic button to indicate what type of service record you would like to create. (i.e CSR, Incidence Response, Emergecy or other)
    3.  Based on the selection for option 2, the form will show certain information needed to open the record.

    Since my button on my first option & the record hasn't been saved yet, there is no [Record ID#].  Is there a way around this?


  • 8.  RE: Approval Button

    Posted 12-26-2018 23:39
    I do not think so, at least not without using actual code.  You will need to set the form properties to only show the button in edit or view mode.


  • 9.  RE: Approval Button

    Posted 12-26-2018 23:41
    Oh shux!  Thank you so much for your quick response.


  • 10.  RE: Approval Button

    Posted 12-26-2018 23:43
    Note that in Add mode you could just expose the field to be updates and they can just select Approved from a radio button or a drop down list on the form.  It is still just 1 click.