url button to import CSV file

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I want to create a URL button to import CSV data.  I have tried the CSV sync but my data does not have a unique non blank field as it comes in raw form and creating the field would be extra work.  I tried using grid edit and there are extra steps in adding rows prior to pasting in the data and has potential for human error.

I have 2 tables.  The parent table includes 4 companies with relevant information. The second table includes child records for transactions related to the different companies.  From the parent table, I have a button to add transactions.  I am then directed to a form where I want to create a button to import the CSV data that I have saved to a file in a local folder and have it related to the selected parent Record.  The fields in the CSV file are Date, Payee, Amount.  The CSV file will be pulled daily and will only include new data to be imported to the child table.

I see there is an API_ImportFromCSV but being a relatively new QB user I do not know how to apply it to a URL button.

Any help would be greatly appreciated!

Photo of Rich

Rich

  • 40 Points

Posted 3 years ago

  • 0
  • 1
Let takes this step by step.  You say that you only have 4 Companies.  Let's say that their respective [Record ID#] s are 1, 2, 3, 4.  Are you willing to add a column to your data to add the column for [Related Company]?

If you are, then ave you tried using the manual import function where you go to the Table icon and then look for the import Button?

If you are willing to do those steps, then I can help you make a URL button to take you to that import page and specify the table to import into.  But those child records would need to have that column for [Related Parent] added in as a column.
Photo of Rich

Rich

  • 40 Points
Yes I can add that field to my data but it would be an extra step.  Also, the manual import can be cumbersome as you have to choose the type of import and verify the mapping.  This work is done by 3 different users every day.  I was hoping to have 2 steps.  (1) Download .csv from the web to a folder. (2) click import CSV button and select the file to be imported.  done!
I see what you are trying to do here.  My only suggestion that is native QuickBase would be to paste the raw data into an Excel sheet.  Then on another sheet you would hand enter the Company Record ID#.  Then  the next excel sheet would calculate a unique key by using a formula to use that date date of today and the row number of the sheet - there is an excel function for Row.  This final sheet would also add in that company column.

Then save as CSV, and that single sheet would save.  Then upload to dropbox.

So the user would get the raw data, paste it in, update the company #, and then save as CSV and then copy the csv to DropBox.
Photo of Rich

Rich

  • 40 Points
Thank you.  I will test it to see how much extra work it is.