How can I auto-populate the per diem amount based on number of days selected and based on the location selected from earlier fields on the form? I have imported the GSA Per Diem rates into a SQL database.
Question
Question
Replies
Hi Jorge,
If the per diem rates are stored in a SQL database, you can create a lookup rule to retrieve the rate based on the location selected, then use a formula to calculate the total amount based on the number of days. Be sure to configure your data source and associate that business process with the data source. Hope that helps!
Hello,
Are we able to use an API as a datasource in Laserfiche Forms? It seems like this is the only way to be able to get the per diem rate by searching with the zip code.
This is the link that GSA provided for using their API for the per diem rates:
Did you get this to work?
We are wanting to use the API to auto fill the form as well.
Yes. What we ended up doing was importing the Per Diem database into an internal database where we could then configure the lookups on Forms.
Jorge,
Do you have a link to the database you downloaded from them? we found the Excel sheets they publish, but those took some manual manipulation to get into a CSV format and still are not fun to lookup against...
Jorge, did you see this article:
https://answers.laserfiche.com/questions/129333/Nested-IF-Statement-in-Calculations