Forum Discussion
AlexBennett3
5 years agoQrew Trainee
Hey Ahuva,
Could you give me some tips on getting this set up? I've got the API Call set up and created an app token, changed the fid's to the desired values, but getting errors for invalid input (Code 2). Will this allow me to create a button that will add these values to the fields I select?
Thanks,
------------------------------
Alex Bennett
------------------------------
Could you give me some tips on getting this set up? I've got the API Call set up and created an app token, changed the fid's to the desired values, but getting errors for invalid input (Code 2). Will this allow me to create a button that will add these values to the fields I select?
Thanks,
------------------------------
Alex Bennett
------------------------------
AhuvaBrown
5 years agoQrew Cadet
Can you show me your code and the error messages?
------------------------------
Ahuva Brown
------------------------------
------------------------------
Ahuva Brown
------------------------------
- AlexBennett35 years agoQrew Trainee
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&rid=" & [Record ID#] & "&apptoken=uw4jq7b9wmt6ybm59yqvc2dzpdj" & "&_fid_53=" & "3" & "&_fid_60=" & "3" & "&_fid_67=" & "2" & "&_fid_74=" & "2" & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])
------------------------------
Alex Bennett
------------------------------- AlexBennett35 years agoQrew TraineeURLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=uw4jq7b9wmt6ybm59yqvc2dzpdj" &
"&_fid_53=" & "3" &
"&_fid_60=" & "3" &
"&_fid_67=" & "2" &
"&_fid_74=" & "2" &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() &
"?a=dr&rid=" & [Record ID#])
Sorry for the format...
And this is my first attempt at an actual API Call within QuickBase so I apologize!
------------------------------
Alex Bennett
------------------------------- AhuvaBrown5 years agoQrew CadetIf the fields you're trying to edit are numeric fields, it might help to write the URL this way, as the extra ampersands and quotations aren't technically necessary for numeric values.
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=uw4jq7b9wmt6ybm59yqvc2dzpdj" &
"&_fid_53=3" &
"&_fid_60=3" &
"&_fid_67=2" &
"&_fid_74=2" &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() &
"?a=dr&rid=" & [Record ID#])
If that doesn't help, did the error message provide you with any details other than the error code?
I'm assuming the message looked something like this. Was there anything specified in the <errdetails> tag?
<qdbapi>
<action>API_EditRecord</action>
<errcode>2</errcode>
<errtext>Invalid input</errtext>
<errdetail>
details
</errdetail>
<rid>rid</rid>
<num_fields_changed>0</num_fields_changed>
<update_id/>
</qdbapi>
------------------------------
Ahuva Brown
------------------------------