Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
Easy to do with script and probably more reliable and feature rich than using a Webhook.
I manually tested some simple code from the console as demonstrated by the following screenshots and script:
Screenshot taken before script in console is executed showing no records in table:
Screenshot taken after script in console is executed showing the [Record Owner] has been modified to the used identified in the CSV by the Email field:
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=636
Notes:
(1) The basic idea is to import the records using API_ImportFromCSV and received the [Record ID#] and [Email] fields in the XML Response. Then parse out the [Record ID#] and [Email] values from the XML Reponse and make individual calls to API_ChangeRecordOwner to change the [Record Owner] to the user identified by the email address.
(2) This is just a proof of concept solution implemented manually from the console if a few minutes (it takes more time to write up my answer!). In reality if you have a lot of records being imported - say 100 records - you cannot launch all the AJAX requests all at once as I have or your browser will run out of available sockets. There is a simple solution to this using async / await feature in JavaScript. FWIW, this congestion is analogous to the congestion you might encounter using a Webhook where QuickBase may rate limit your Webhook activity. The difference is that using script it is possible to customize, monitor and react to any network congestion (using async / await for example).
(3) It is simple to bind a <input type=file> control to select the CSV file you want to import and process it in the fashion indicated by my code.
(4) This may sound very complicated to users not familiar with JavaScript but I assure you it is quite simple to do once you get the hang of the technique. I am not bragging when I say I can almost instantly identify a script solution once the problem is understood. What I am trying to convey is that there is nothing you can't in QuickBase with script.
I manually tested some simple code from the console as demonstrated by the following screenshots and script:
Screenshot taken before script in console is executed showing no records in table:
Screenshot taken after script in console is executed showing the [Record Owner] has been modified to the used identified in the CSV by the Email field:
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=636
Notes:
(1) The basic idea is to import the records using API_ImportFromCSV and received the [Record ID#] and [Email] fields in the XML Response. Then parse out the [Record ID#] and [Email] values from the XML Reponse and make individual calls to API_ChangeRecordOwner to change the [Record Owner] to the user identified by the email address.
(2) This is just a proof of concept solution implemented manually from the console if a few minutes (it takes more time to write up my answer!). In reality if you have a lot of records being imported - say 100 records - you cannot launch all the AJAX requests all at once as I have or your browser will run out of available sockets. There is a simple solution to this using async / await feature in JavaScript. FWIW, this congestion is analogous to the congestion you might encounter using a Webhook where QuickBase may rate limit your Webhook activity. The difference is that using script it is possible to customize, monitor and react to any network congestion (using async / await for example).
(3) It is simple to bind a <input type=file> control to select the CSV file you want to import and process it in the fashion indicated by my code.
(4) This may sound very complicated to users not familiar with JavaScript but I assure you it is quite simple to do once you get the hang of the technique. I am not bragging when I say I can almost instantly identify a script solution once the problem is understood. What I am trying to convey is that there is nothing you can't in QuickBase with script.