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:
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:
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:
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.
No, Forms lookup rules and data source only support data from database (Microsoft SQL Server or Oracle).
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 }); });