You are viewing limited content. For full access, please sign in.

Question

Question

Using an API as a data source for Laserfiche Forms

asked on August 4, 2016 Show version history

Hello,

 

Can we use an API as a datasource for doing lookups in Laserfiche Forms? I'm trying to use the API for the per diem rates.

 

Here is the link for the GSA Per Diem API:

http://www.gsa.gov/portal/content/162379

2 0

Replies

replied on May 1, 2020 Show version history

This kind of thing should definitely be added to Laserfiche.

Lf Forms should allow for a JSON REST API to be configured as a data source - or better still it could be an additional type of plugin just for web services.

Configuration would require the following:

  • Web service endpoint URL
  • Mapping of expected JSON property names to Lf Forms variables

 

 

 

4 0
replied on January 14, 2021

Yes using API to be configured as a data source for lookup is very useful feature that should be in Forms.

 

Now most of the customers and systems doesn't provide direct access to the database through tables or views, instead they are providing only web services for security.

 

I hope I can see this feature in Forms soon as we have a lot of customers requesting it.

3 0
replied on August 4, 2016

No, Forms lookup rules and data source only support data from database (Microsoft SQL Server or Oracle).

 

0 0
replied on November 13, 2017 Show version history

Hey, I know this is an old question, while it can't be loaded in as a data source, a query can still be ran on it with JQuery using JQuery .getJSON

 

See code example below for how we implemented this on our own project.

 

Also note that you may need to pop the code out into the separate pop out option to read it better due to the length of the API URL

 

  //q61 is the input box for the zip code used for Querying API
  $("#q61 input").change(function(){
    
    var currentYear = (new Date()).getFullYear();
    var currentZip = $(this).val();
		$.getJSON( "https://inventory.data.gov/api/action/datastore_search?resource_id=8ea44bc4-22ba-4386-b84c-1494ab28964b&filters=%7B%22FiscalYear%22:%22"+currentYear+"%22,%22Zip%22:%22"+currentZip+"%22%7D", function( data ) {
			//Code your trying to accomplish with API Query goes here
          });
});

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.