Forum Discussion

manoharvankired's avatar
manoharvankired
Qrew Trainee
2 years ago

Move and delete a Record with API Buttons in Quick Base

Please help me with the formula to move and delete the records with API button in quickbase between two table

URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=API_AddRecord"
& "&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np"
& "&_fid_23=" & URLEncode([Task Type Details - Task Type])
& "&_fid_24=" & URLEncode([Task Name Details - Task Name])
& "&_fid_13=" & URLEncode([Study Number])
& "&_fid_14=" & URLEncode([BMS-TMF-Number])
& "&_fid_15=" & URLEncode([Site Number])
& "&_fid_16=" & URLEncode([Country])
& "&_fid_17=" & URLEncode([Request Received Date])
& "&_fid_18=" & URLEncode([TAT])
& "&_fid_19=" & URLEncode([Planned Completion Date])
& "&_fid_20=" & URLEncode([Assigned])
& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_INPROGRESS] & "?a=dr&rid=" & [Record ID#])
& "&disprec=1"
& "&_fid_21=" & URLEncode(URLRoot() & "db/" & [_DBID_NEW_REQUEST] & "?a=API_DeleteRecord&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np&rid=" & [Record ID] & "&disprec=1"
& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_INPROGRESS] & "?a=dr&rid=" & [Record ID#]))



------------------------------
manohar vankireddy
------------------------------

1 Reply

  • The easiest way to do this is to do the delete first.

    var text Delete = URLRoot() & "db/" & [_DBID_NEW_REQUEST] & "?a=API_DeleteRecord&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np&rid=" & [Record ID];

    var text AddAndDisplay = URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=API_AddRecord"
    & "&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np"
    & "&_fid_23=" & URLEncode([Task Type Details - Task Type])
    & "&_fid_24=" & URLEncode([Task Name Details - Task Name])
    & "&_fid_13=" & URLEncode([Study Number])
    & "&_fid_14=" & URLEncode([BMS-TMF-Number])
    & "&_fid_15=" & URLEncode([Site Number])
    & "&_fid_16=" & URLEncode([Country])
    & "&_fid_17=" & URLEncode([Request Received Date])
    & "&_fid_18=" & URLEncode([TAT])
    & "&_fid_19=" & URLEncode([Planned Completion Date])
    & "&_fid_20=" & URLEncode([Assigned])
    & "&disprec=1";

    $Delete

    & "&rdr=" & URLEncode($AddAndDisplay)



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