How to get return value from API call in a formula field?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I have two tables.  I want to be able to color cells in Table One based on the existence of a record in Table Two.  I currently have a text formula field with the following URL using the DoQueryCount.

URLRoot() & "db/" & [Table Two ID] & "?a=API_DoQueryCount&query={'fid1'.CT.'"&[field from Table One that is in common with both tables]&"'}AND{'fid2'.CT.'xx'}"

I know the query is fine because it returned the expected XML when I plug it into the browser.  How do I get the field to have the value in it and not just the url?  Is there a better way to do this?

Thank you in advance for your time.

Photo of enielsen0001


  • 40 Points

Posted 3 years ago

  • 0
  • 1
Photo of Eric


  • 40 Points
There's not a way to store an API call result into a field without some kind of outside script to run the request then publish it into your record(s). A simpler way would be to create a relationship that you can link the separate records together, and if a reference field, summary field, lookup field, etc. has a certain value driving your process you could then setup your colored cell formula based on that.