Forum Discussion

MarkWinter1's avatar
MarkWinter1
Qrew Trainee
8 years ago

Creating a Formula field for table to table import

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:
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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.
  • 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 )
  • 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.  
    • MarkWinter1's avatar
      MarkWinter1
      Qrew Trainee
      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.