Forum Discussion

BrianCafferelli's avatar
BrianCafferelli
Quickbase Staff
8 years ago

How do I have a single button perform multiple Quick Base API calls?



[The Quick Base Knowledge Base is your library of frequently-asked questions that help you better customize your apps to solve your business problems.]

Every API call includes an optional rdr parameter. This tells the browser what page to go to when the API action completes successfully. Within the limit of a URL you may include as many API commands as you want. To accommodate all browsers, keep your URL length to roughly 1,000 characters when submitting a GET request. You should be safe using a 2,000-character limit with modern browsers, however.

Important: You must encase every redirect parameter in a URLEncode function. Without this, Quick Base ignores that API statement.

For example:

URLRoot() & "db/" & DBid() & "?act=API_EditRecord&_fid_16=VALUE1&apptoken=XXXXXXXXXXXXXXXXXXXXXXXXXXXX&rid=" & [Record ID#] & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_CHILD_TABLE] & "?act=API_AddRecord&_fid_6=" & [Record ID#] & "&_fid_8=VALUE2&apptoken=XXXXXXXXXXXXXXXXXXXXXXXXXXXX&rdr=" & URLEncode(URLRoot() & "db/" & DBid() & "?a=q&qid=1"))
Note: Quick Base recommends that you use application tokens for all API calls for security purposes. Read more about tokens in the Quick Base online help.
No RepliesBe the first to reply