Forum Discussion

ChrisFaye1's avatar
ChrisFaye1
Qrew Cadet
6 years ago

API/Magic Button - 'XML does not have any style info'

Hi, 

My magic button is set up and creates the new record properly, but then does not reload the original record and instead gives me this. The odd part about this is the button works in exactly the same way (mostly same code) in another table only copying different info and that one works fine. 

Note: Yes, the table name is Tranactions without an s

Thank You in advance!

Here's the return message - 

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<qdbapi>
<action>API_AddRecord</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<rid>15</rid>
<update_id>1570462958983</update_id>
</qdbapi>

Here is my formula - 

// edit the record: fid 109 to [Approved By] - Stamp application with approver name and date/time

var text URLONE = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_1058=" & URLEncode(UserToName(User()))
& "&apptoken=....";

// Add record in 'Transactions' Table & copy fid 106 (Unit - Record ID) to [Related Unit]
// The first fid is always the field in the destination table and the second fid is always the orginating field.
// Copy to this field from this field.

var text AddRecord =URLRoot() & "db/" & [_DBID_TRANACTIONS]
& "?act=API_AddRecord"
& "&apptoken=...."
& "&_fid_185=" & [Record ID#] 
& "&_fid_183=" & ToText([Approved By]); 

//Display Current Record

var text DisplayRecord=
URLRoot() & "db/" & Dbid()
& "?a=dr&rid=" & [Record ID#]
& "&apptoken=....";

//String, Edit, Add Record and Display Current Original Record

$URLONE
& "&rdr=" & URLEncode($AddRecord)
& URLEncode("&rdr=" & URLEncode($DisplayRecord))


------------------------------
Chris
------------------------------
  • Hmmm, I can't spot the error. 

    Try removing the

    & "&apptoken=....";

    From the the last step which is to display the record., but you still need to end it with ;

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------
  • Can you elaborate on 'mostly same code'; what is different?

    ------------------------------
    Adam Keever
    ------------------------------