Discussions

 View Only
  • 1.  Creating a Formula field for table to table import

    Posted 09-17-2017 02:56
    Hello, 

    I have created a table to table import in my application. I want to expose the capability for users to run the import. I believe I should be able to create a URL field that would enable this, but no luck. Can someone help me?

    Here is the URL I think should work:
    https://domain.quickbase.com/db/[table">https://domain.quickbase.com/db/[table">https://domain.quickbase.com/db/[table DBID]?a=API-Runimport&ID=10&user_token=b3h8mh_k_cdjkkufdqxw6ngdaxwce9czw8vmp


    I am just trying to execute this in the browser when logged in to QB and I always get:


    No Such OperationThis operation does not exist. Please check the URL.

    Thanks in advance for your help!


  • 2.  RE: Creating a Formula field for table to table import

    Posted 09-17-2017 03:39
    If you are using the QB sync you can create a formula URL button on that table to "expose" the refresh to all your users:

    "javascript:$.post('https://yourdomain.quickbase.com/qb/sync/refreshTasks?replicationID=12345').then(function(res,code) {console.log(res,code);window.location.reload()})"

    You have to find your "replication code" by looking in the developer console.

    Select to "preserve logs" and look for the request that gets sent when you, as the admin, click the button to refresh.

    Also, you should be vary carful about posting your "User Token".  This is one of the highest level of security.


  • 3.  RE: Creating a Formula field for table to table import

    Posted 09-17-2017 12:55
    Your formula has one incorrect character.


    It should be a=API_RunImport


    Underscore, not hyphen,.


    Then it will work

    (Matthew answered the much more difficult question of how to let a User initiate a Sync )


  • 4.  RE: Creating a Formula field for table to table import

    Posted 09-17-2017 17:03
    Thanks for the quick responses, you guys are awesome!

    I am using the Import table feature, (More, Import/Export, Import into a table from another table).  I am not able to find a replication code when I execute that feature.  


  • 5.  RE: Creating a Formula field for table to table import

    Posted 09-17-2017 17:06
    See my response above.


  • 6.  RE: Creating a Formula field for table to table import

    Posted 09-17-2017 20:01
    Thanks, you're solution did work...sometimes it is the simplest thing that works :)  So, now I have a refresh button that anyone can use, which is 90% of the way there. If I could refresh each time there was a change in my main table, I would be golden. It seems like I should be able to do this in a Webhook or Quickbase action, but I haven't figure it out yet.  Any additional help would be much appreciated.