Our Knowledge Base covers a wide variety of technical topics, from the basic to the complex.
How do I have a single button perform multiple QuickBase HTTP API operations?
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, QuickBase ignores that API statement.
An example is shown below. To see this demonstrated, please see this video.
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: QuickBase recommends that you use application tokens for all API calls for security purposes. Read more about tokens in the QuickBase online help.