Forum Discussion

MichaelMahon's avatar
MichaelMahon
Qrew Trainee
3 years ago

Create a button with a default file name/path

Our company has Pipelines locked down to be insanely restrictive so I'm having to be a little creative here. RIght now I am building an app for a non-technical audience where they need the ability to import daily work tasks into QB from an external file which is stored on an internal network share.

I am looking for a way to achieve the following options

A) View a sample or demo of an API button that will import data from a file (csv or xlsx) into a table.  I'd like to actually see it in action rather than a script. I have not been able to locate any resources that actually show this function

Or

B) Create a button that will allow the intended user to attach a file as a record then get the data from that attached file into a table. (Not sure if that's even possible. )
The button would have to be a hardcoded url/file name that never changes. 


Happy to provide additional details if needed.

Thank You




------------------------------
Michael Mahon
------------------------------
  • Let's start with low tech.

    Can you just make this URL formula button which will land the user on the native import menu?

    URLRoot() & "db/" & [_DBID_ of the table name from advanced properties]
    & "?a=ImportExport&preselect=optImportFromFile"

    The user will then navigate to where the file is stored on their computer or network drive.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • MichaelMahon's avatar
      MichaelMahon
      Qrew Trainee
      That's going to be my last resort. The less navigation I can have I can have the user do is the ultimate goal. 
      Is it possible using that formula to have the fields pre filled and read only when they land on the import screen? That at least keeps them from choosing other than the intended file?




      ------------------------------
      Michael Mahon
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        It is hard to say that something is absolutely impossible but I've never heard of anybody being able to pre-populate the file path.

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------
    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander
      Mark,

      I was unaware of the import from file. Does this actually map fields from the import?

      ------------------------------
      Mike Tamoush
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        @Mike Tamoush

        Really? you have never imported an excel xlsx sheet or CSV file into Quickbase?​  You're just navigate to your file and you need to match up which columns in the the spreadsheet match up to your fields and QuickBase.  

        If they are going to be repetitive imports than either you need to contrive that the column headings in excel exactly match your field names or failing that if it's not possible for some reason there is another technique to import the Excel sheet as he is into a scratch file table so that the field names will match up perfectly and then press a button to import from the scratch file table over to your real table.

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------