Forum Discussion
NirajShah
7 years agoQrew Cadet
Thanks for all the feedback, I think I'm close to figuring this one out. Here's where I am now;
Here is the meat of my formula that I'd love feedback on. The version below was accepted by QB but for some reason fid 14 did not populate when the approve option was selected but did when reject was selected. As I commented below the redirect I have in the approve is not populating the target table and goes to an xml page (see below):
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>1</rid>
<num_fields_changed>0</num_fields_changed>
<update_id>1545345688859</update_id>
</qdbapi>
var text approve = URLRoot() & "db/" & [_DBID_] & "?a=API_EditRecord&apptoken=xxxxxxxx&rid=" & URLEncode ([Record ID#])
& "&_fid_12=" & URLEncode("Approved")
& "&_fid_13=" & URLEncode(Now())
& "&_fid_14=" & URLEncode(User())
& "&rdr=" & URLEncode(URLRoot() & "db/xxxxx?a=API_EditRecord&apptoken=xxxxxx&rid=" & URLEncode ([Related Store Item]))
& "&_fid_14=" & URLEncode([# of Features Requested]);
//the redirect is not populating the fields and when i add another redirect it comes back with a syntax error
var text reject = URLRoot() & "db/" & [_DBID_] & "?a=API_EditRecord&apptoken=xxxxxx&rid=" & URLEncode ([Record ID#])
& "&_fid_12=" & URLEncode("Rejected")
& "&_fid_13=" & URLEncode(Now())
& "&_fid_14=" & URLEncode(User())
& "&rdr=" & URLEncode(URLRoot() & "db/xxxxx?a=dr&rid=" & ([Record ID#]));
Funny thing is, when I remove the redirect from the approval, fid 14 is populating fine.
Here is the meat of my formula that I'd love feedback on. The version below was accepted by QB but for some reason fid 14 did not populate when the approve option was selected but did when reject was selected. As I commented below the redirect I have in the approve is not populating the target table and goes to an xml page (see below):
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>1</rid>
<num_fields_changed>0</num_fields_changed>
<update_id>1545345688859</update_id>
</qdbapi>
var text approve = URLRoot() & "db/" & [_DBID_] & "?a=API_EditRecord&apptoken=xxxxxxxx&rid=" & URLEncode ([Record ID#])
& "&_fid_12=" & URLEncode("Approved")
& "&_fid_13=" & URLEncode(Now())
& "&_fid_14=" & URLEncode(User())
& "&rdr=" & URLEncode(URLRoot() & "db/xxxxx?a=API_EditRecord&apptoken=xxxxxx&rid=" & URLEncode ([Related Store Item]))
& "&_fid_14=" & URLEncode([# of Features Requested]);
//the redirect is not populating the fields and when i add another redirect it comes back with a syntax error
var text reject = URLRoot() & "db/" & [_DBID_] & "?a=API_EditRecord&apptoken=xxxxxx&rid=" & URLEncode ([Record ID#])
& "&_fid_12=" & URLEncode("Rejected")
& "&_fid_13=" & URLEncode(Now())
& "&_fid_14=" & URLEncode(User())
& "&rdr=" & URLEncode(URLRoot() & "db/xxxxx?a=dr&rid=" & ([Record ID#]));
Funny thing is, when I remove the redirect from the approval, fid 14 is populating fine.
NirajShah
7 years agoQrew Cadet
Good point - and this may be where I am messing up.
The first id 14 is being set as a user field in the current table. Then I am (attempting) to do a redirect to another table and record to define that tables fid 14 as a value from the first table.
I hope that makes sense in all my madness!
The first id 14 is being set as a user field in the current table. Then I am (attempting) to do a redirect to another table and record to define that tables fid 14 as a value from the first table.
I hope that makes sense in all my madness!