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

Question

Question

Mobile app write to local device for lookup?

asked on August 4, 2020

Hello all,

Wondering if there's any way within or available to Laserfiche Offline Forms (perhaps javascript?) for storing certain field values locally as well as to the database server, for parsing values to check against, given the following:

We'd like to be able to do lookups from the device/handset that's in use, without having to 'dial-home', for checking if a record has already been entered that day. Operating through the online forms creates a MAJOR reduction in productivity and efficiencies, including for live lookups to growing databases, or limited to no data service. It would only need to be for the one User and for a specific period of their operation, eg the current business hours.

Something along the lines of a field on the form, eg CustomerRef, that when submitted goes to the Laserfiche Server with the other form data and related processing, but just that field input also gets stored locally in Laserfiche or a blank file perhaps, I'll call 'PreviousRefs'. When the next form is started and the User enters the CustomerRef it checks against the PreviousRefs for a match just like a Lookup. A notification then displays if found (this part we've been able to implement through hidden fields, html and field rules). So the PreviousRefs will start with just one entry after the first submission and grow for that period, but nowhere near as much as an entire month's worth of data for example, and doesn't have to be persistent storage beyond that period. I don't see this working under the current model of Form data sources.

Overview -

Form fields all sent to Servers, Workflows etc:

CustomerRef: xyz123

Date: yyyy/mm/dd

OtherField: thisone

Submit

 

'PreviousRefs' stored locally:

xyz123,xyz124, ...

 

Help or insight appreciated,

Regards.

0 0

Answer

SELECTED ANSWER
replied on August 18, 2020

Have implemented a limited remediation using session / localStorage.setItem,.getItem, largely thanks to this thread:

https://answers.laserfiche.com/questions/84753/Forms--Edited-title-is-there-any-way-to-keep-that-edited-title-on-submit#84922

 

$('.thisField').change(function()
{
  var compareInput = $('.thisField input:text').val();
  if (compareInput == localStorage.getItem('fieldTemp'))
  {                               
    //display Alert! boxes
    $('.alertBox').show(); 
    alert(localStorage.getItem('fieldTemp')+" has been used recently. Continue?");
  }
  else
  {
    $('.alertBox').hide();
  }
}
);

 

$('.Submit').click(function()
{
  localStorage.setItem('fieldTemp',$('.thisField input:text').val());
}
);

 

0 0

Replies

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

Sign in to reply to this post.