Skip to main content
Question

XML Issue

  • March 27, 2023
  • 0 replies
  • 189 views

I am creating a button to change a status field. I am getting the XML style information issue. The button works correctly and I know it has something to do with the code not redirecting back to the rid but I'm not sure how to fix it. 

Here is the XML error

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

Here is my code: (this may be overcomplicated. Probably an easier way to accomplish this)

var text URL = URLRoot() & "db/bsy9zg874?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_330=Review%20for%20Inspection&z=" & Rurl();
var text Image = "<img src='https://expertclaimmanagement.quickbase.com/up/bjvfbr5ux/g/rbh/eg/va/button_rev-for-insp.png'>";

"<a href='" & $URL & "' target='_blank'>" & ($Image) & "</a>"

Can I get some help cleaning up this code to correct the error?

thank you very much!



------------------------------
Rhonda Jones
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

So, believe it or not you are very close and this is not an error. Granted it's not a great user experience.

Whenever you call an API you then need to follow that up with landing the user on a record or a report or some kind of home page or Dashboard .  If you don't do that the API feels compelled to spew it's response back to the user on the screen.   In this case it is saying "good news you have no error".

So, here is alternative  code to refresh the page the user was on when they pushed the button.  

var text Edit = URLRoot() & "db/bsy9zg874?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_330=" & URLEncode("Review for Inspection");

var text RefreshPage =  URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();

 
var text URL = $Edit
& "&rdr=" & URLEncode($RefreshPage);


var text Image = "<img src='https://expertclaimmanagement.quickbase.com/up/bjvfbr5ux/g/rbh/eg/va/button_rev-for-insp.png'>";

"<a href='" & $URL & ">" & $Image & "</a>"



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