Forum Discussion
QuickBaseCoachD
8 years agoQrew Captain
That javascript refresh is super handy, but it also hide error messages.
To debug,
Do this and then it will expose the success or failure message.
var text URL= URLRoot() & "db/" & Dbid() & "?a=API_AddRecord"
& "&_fid_15=" & [Related Sales order]
& "&_fid_13=" & URLEncode([Related Product])
& "&_fid_7=" & URLEncode([Product Description]) // this is a multi-line text box.
& "&_fid_8=" & [Product Quantity]
& "&_fid_9=" & [Product Unit Price]
& "&_fid_24=" & ToNumber([Taxable Item]);
$URL
//"javascript:" &
//"$.get('" &
//$URL &
//"',function(){" &
//"location.reload(true);" &
//"});"
//& "void(0);"
To debug,
Do this and then it will expose the success or failure message.
var text URL= URLRoot() & "db/" & Dbid() & "?a=API_AddRecord"
& "&_fid_15=" & [Related Sales order]
& "&_fid_13=" & URLEncode([Related Product])
& "&_fid_7=" & URLEncode([Product Description]) // this is a multi-line text box.
& "&_fid_8=" & [Product Quantity]
& "&_fid_9=" & [Product Unit Price]
& "&_fid_24=" & ToNumber([Taxable Item]);
$URL
//"javascript:" &
//"$.get('" &
//$URL &
//"',function(){" &
//"location.reload(true);" &
//"});"
//& "void(0);"
- MarkCorcoran8 years agoQrew CadetThis is the result.
<qdbapi>
<action>API_AddRecord</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<rid>68</rid>
<update_id>1508604229225</update_id>
</qdbapi> - QuickBaseCoachD8 years agoQrew CaptainOK, so put back the formula the way it was. I thought you meant that it did not create the record. You are saying that it does create the record, but the fid 7 is blank.
When you view (not edit) the source record that you are copying, can you tell me what text is on the field [Product Description]? ie does it in fact have text in it? - MarkCorcoran8 years agoQrew CadetHere is picture of the table with examples.
- QuickBaseCoachD8 years agoQrew CaptainHmmm, it should work.
Does it also fail on the record that says UPS Ground? - MarkCorcoran8 years agoQrew CadetThat line copies just fine, which is what lead me to believe it had something to do with the multiple lines. (thanks for you help with this)
- QuickBaseCoachD8 years agoQrew CaptainHmmm, so the issue is data dependent. The URLEncode is supposed to take care of that problem of special characters. Is is just = equals signs as special characters that you have on the text boxes which fail? It was hard to see in the screen shot. I guess you have () characters too.
Also when you have the formula pointing back to [Product Description2] and that field has = equals signs, does it fail or succeed? - MarkCorcoran8 years agoQrew CadetSpecial characters commonly used are = : ( ) /
and carriage return.
I'll work on a process of elimination to see if I can narrow it down.
[Product Description2] the lookup is just the product description only and would never contain special character (with the exception of maybe / ). - MarkCorcoran8 years agoQrew CadetIt is the multi-line that is creating the issue. As long as I have just one line of text, it works, when I add a second line, it fails (it doesn't create the record at all).
In addition, if I add the = character to a single line, it fails to display the description, but it does create the record. - QuickBaseCoachD8 years agoQrew CaptainI'm running out of ideas.
out of desperation you could try this
& "&_fid_8=" & ToText([Product Quantity])
& "&_fid_9=" & ToText([Product Unit Price])
& "&_fid_24=" & Totext(ToNumber([Taxable Item])); - _anomDiebolt_8 years agoQrew EliteMultiline parameters should not be passed in the query string of GET requests. There can be touchy issue even if you URLEncode the query string parameter. The most comprehensive solution is to use script.
There probably is a native workaround but I would have to see the absolutely most simplistic example that fails. All the other fields and the context of your full application are just obscuring the core problem. Create the simplest possible example (new application , one table, minimal number for fields and test data) that demonstrates the same problem.