Creating a Formula field for table to table import

  • 1
  • 1
  • Question
  • Updated 1 year ago
  • Answered
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 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!
Photo of Mark Winter

Mark Winter

  • 252 Points 250 badge 2x thumb

Posted 1 year ago

  • 1
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
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.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,296 Points 50k badge 2x thumb
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 )
(Edited)
Photo of Mark Winter

Mark Winter

  • 252 Points 250 badge 2x thumb
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.  
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 49,300 Points 20k badge 2x thumb
See my response above.
Photo of Mark Winter

Mark Winter

  • 252 Points 250 badge 2x thumb
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.