Forum Discussion
15 Replies
Sort By
- _anomDiebolt_Qrew EliteYou can in fact use API_ImportFromCSV as a GET method so you could build a blob of CSV data in the formula language and add multiple records with one API call via a formula. Conceptually you would use a formula like this but I have not tested it (there could be a typo or bad assumption concerning field types) and you will certainly have to make modifications based on your fields and table structure:
var Text $csvdata =
ToText(+1) & "," & & "," && "\n" & +2) & "," & & "," &
ToText(& "\n" & +3) & "," & & "," &
ToText(; http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
URLRoot() &
"db/" &
[_DBID_YOUR_TABLE_NAME] &
"?act=API_ImpportFromCSV" &
"&records_csv=" & $csvdata &
"&clist=6.7.8" &
"&apptoken=xxxxxxxxxxxxxxxxxx";
You have to be careful building the CSV blob if quotes are needed and use URL encoding where necessary. I really don't recommend doing this as using script is the preferred and more flexible solution. But if you are stuck in a world where forces beyond your control are forcing you to use only formula URLs at least you do not have to use multiple rdr parameters to add multiple records.
This method is not foolproof if you are attempting to add a lot of CSV data as URLs have a maximum allowed length which varies by browser: