import records from excel with different user names

  • 0
  • 1
  • Question
  • Updated 9 months ago
  • In Progress
I'm trying to import records from excel that belong to different QuickBase users. I have  tried to add record owner in excel column in different ways ex: Surname, first name / Email address / User's ID, but did not work, it always shows the record owner as myself after the records imported?  any ideas how to solve this? thanks
Photo of Eias666

Eias666

  • 60 Points

Posted 9 months ago

  • 0
  • 1
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,756 Points 5k badge 2x thumb
As far as I know, there is no way to import data into the record owner field. But, there is another workaround is to change the record owner through the webhook after the record created.

Do let me know if you would to proceed with the solution.

Thanks,

Gaurav
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,572 Points 20k badge 2x thumb
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.
(Edited)