Forum Discussion
GrahamHaskin
Qrew Trainee
Yes, they all have a unique ID number, and it's currently set up as the key record field.
------------------------------
Graham Haskin
------------------------------
------------------------------
Graham Haskin
------------------------------
MarkShnier__You
3 years agoQrew Legend
Hey so what I do in the situation is to create a copy of the target table so that all the field names match exactly. There is a function when you were sitting on the table homepage to copy this table. Name that Table Import Scratchpad.
Tentatively, if your field names in your CSV import do not perfectly match the field names in QuickBase then create the scratchpad table by importing the CSV and letting it create the fields.
Import the data into that table.
Make a relationship between the scratch pad table and your life table so that one live record has many scratchpad imports.
That allows you to determine for the live records whether or not they have data in the scratch pad import set.
I typically then create a Helper table with a single record in it. It will be record ID number one. Then I make summary fields and buttons there to be able to have a URL formula button to purge out any live records where the import set does not contain that record.
So then the process would be to have a button on the helper record to clear the scratchpad. Then another button to purge the live records which need to be deleted, and of course he would show account for a sanity check of how many records you're about to delete, and then another button to import the users from the scratch pad into the live table. You can also have a sanity check summary total on that helper table record to show the number of new users who will be created.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
Tentatively, if your field names in your CSV import do not perfectly match the field names in QuickBase then create the scratchpad table by importing the CSV and letting it create the fields.
Import the data into that table.
Make a relationship between the scratch pad table and your life table so that one live record has many scratchpad imports.
That allows you to determine for the live records whether or not they have data in the scratch pad import set.
I typically then create a Helper table with a single record in it. It will be record ID number one. Then I make summary fields and buttons there to be able to have a URL formula button to purge out any live records where the import set does not contain that record.
So then the process would be to have a button on the helper record to clear the scratchpad. Then another button to purge the live records which need to be deleted, and of course he would show account for a sanity check of how many records you're about to delete, and then another button to import the users from the scratch pad into the live table. You can also have a sanity check summary total on that helper table record to show the number of new users who will be created.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
- GrahamHaskin3 years agoQrew TraineeHmm, that's an interesting approach.
Do you have example code for the buttons?
------------------------------
Graham Haskin
------------------------------ - MarkShnier__You3 years agoQrew LegendHere is an example of a button to run a Table to table import
var text URL = URLRoot() & "db/" & [_DBID_COLLECTION_DATA] & "?act=API_RunImport&ID=14";
var text RedisplayRecord = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];
If([# of TCR imports] > 0, // ie scratchpad is not blank.
$URL
& "&rdr=" & URLEncode($RedisplayRecord)
)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is an example to purge the Scratchpad.
var text URL = URLRoot() & "db/" & [_DBID_TCR_IMPORT_SCRATCHPAD] & "?act=API_PurgeRecords";
var text RedisplayRecord = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];
$URL
& "&rdr=" & URLEncode($RedisplayRecord)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------