The "Redirect Mark" technique is a method of using API_ImportFromCSV in a formula URL so as to avoid the use of multiple rdr parameters and multiple calls to API_AddRecord.
I hesitate to give you this information because instead of killing the use of rdr altogether (in favor of script!) you are probably just going to make a cottage industry out of using API_ImportFromCSV in formula URLs and eventually tackle even more complicated tasks by adding a dozen rdr's on the new scheme.
The trick to using API_ImportFromCSV as a formula URL is to string out the record_csv parameter with a newline (\n) in between records of CSV data and to URLEncode() the whole thing.
There is an example coded in this application:
Avoid Excessive Redirects ~ Add Three Stooges
Formula for Button:
var Text csv = "Moe Howard,6/19/1897,125" & "\n" &
"Curly Howard,10/22/1903,87" & "\n" &
"Larry Fine,10/5/1902,115" & "\n" &
var text URLONE = URLRoot() & "db/" & Dbid() & "?act=API_ImportFromCSV" &
"&records_csv=" & URLEncode($csv);
var text URLTWO = "https://haversineconsulting.quickbase.com/db/bk7ne8qi3?a=q&qid=1";
$URLONE & "&rdr=" & URLEncode($URLTWO)
My example was quickly thrown together and it may not make a bunch of sense to add three hardcoded records to the same table. However, I don't think you will have any problem getting real results from this example. Instead of hardcoding the CSV data you can build up the blob of CSV using formula fields and logic.
This new technique will certainly set the progress of QuickBase behind a decade in terms of using script. But Service Workers is coming soon so it will not matter. Prepare top be assimilated.
Be the first to post a reply!