Skip to main content
Question

I have an URL(API) and it returns a number value and i want to store response into a field.

  • June 28, 2019
  • 0 replies
  • 115 views

Please copy paste the below url in the browser and you can see the map {"rate":0}. 

http://solgenservices.com/api/QB/taxrate?street=5102 S Coulee Vista Dr&city=Kennewick&zipcode=99338

This is my formula written in Quickbase to pass the street , City & zipcode dynamically. 

http://solgenservices.com/api/QB/taxrate?street="&[Address: Street 1]&
"&city="&[Address: City]&
"&state="&[Address: State/Region]&
"&zipcode="&[Address: Postal Code]

My requirement is to store the response 0 into a field in quick base.Please let me know if this can be achieved. 
This topic has been closed for replies.

  • Quickbase Alumni
  • June 28, 2019
You can toss some Javascript into a formula-url - and if your solgen services site accepts https request doing something like this: 

var text map = http://solgenservices.com/api/QB/taxrate?street="&[Address: Street 1]&
"&city="&[Address: City]&
"&state="&[Address: State/Region]&
"&zipcode="&[Address: Postal Code]


NOTE: The syntax below is a rough outline - it will need to be tweaked to work in an actual formula

javascript: {
$.get('" & $map & "').then(function(data,success){
//parse the response here
$.get('" //do an api_editRecord call to Quick Base with your response "'); }

Basically do a GET request to your map service - within the GET call - work out the response in the .then function and then chain another GET call to store that value into Quick Base

Chayce Duncan | Director of Strategic Solutions
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base