LESSON

Form Component - Submitting Form Data in Offline Mode

Description

No internet? No problem! With Offline Mode for Forms in Ignition, you can launch a Perspective project totally offline on your device, allowing you to continue submitting form data to device storage from virtually anywhere. When connectivity is restored, the offline submission queue automatically sends all stored data to the gateway for any further processing.

Video recorded using: Ignition 8.3

Transcript

(open in window)

[00:00] No internet? No problem. With Offline Mode for forms in Ignition, you can launch a Perspective project totally offline on your device, allowing you to continue submitting form data to device storage from virtually anywhere. When connectivity is restored, the offline submission queue automatically sends all stored data to the gateway for any further processing. I've got a sample form here in the designer that I'd like to use for data collection and submission, whether I've got a connection to the Gateway or not. Offline Mode gives us that freedom. First, let's make our project offline-capable. In the designer, we can go to project properties, select Offline Mode, and check Enabled. Here, in this popup window, we can also decide on the right permission settings and set the authentication token expiration if we want. For this example, I don't need to make any changes to either, but if you'd like more information on configuring security levels, please check out the link to the Ignition User Manual below this video.

[01:06] Now, I'll launch the Perspective app on an Android emulator and enable Offline Mode for our offline-capable project. In the app, I'll pick the Training project, tap on the three dots menu to reveal the options menu, and choose edit application. This will take us to the manage application view. Here, I can make my project available offline, just by pressing this toggle switch. Once I've saved my changes, it'll automatically download all the resources I'll need to launch my project offline. A refresh icon will appear and we can see when our last update occurred. With these additional Offline Mode settings, we can change the language associated with this application offline or add a new theme to be used when launching the app. Going forward, it's a good idea to check for any recent updates before heading out into the field where your connection might be spotty, especially if it's been a while since you last downloaded the offline resources. When an update's ready, you'll get an on-device notification.

[02:05] You can then open the Perspective app to start the update manually. Let's head back to the applications screen. Here, you can also see if there are any project updates available. If so, the icon for your project will be grayed out and you can tap it to download the update. I'll drag down from the top to get to my internet options and turn off our connection to simulate working in an area with no internet access. Then we can launch the project app completely offline. Since we designated this project as offline capable in the designer and downloaded what we needed for Offline Mode in the app up front, all the necessary resources are in place to give us the essential form functionality we need in the field, regardless of internet availability. The form component's validation and constraints are available and enforced when offline. However, any bindings configured to pre-populate values won't work without a connection to the Gateway. I'll fill my form out with the relevant information, and now we can submit all our data and know it's safely stored on the device's file system, waiting for us to regain our internet connection.

[03:09] Since I'm done with my form, I'll close the app. If we go back to the applications screen, we can see a little orange dot next to the submission queue icon. Let's enter the queue and confirm that the app is storing our data locally. The three dots menu here gives you some options that may come in handy if you run into problems with form submission. If you wanted to, you could even share your form data in an email. Tapping on the actual submission in this screen will open up the details and show the raw form data that the Perspective app packaged up nicely for us in JSON format. Now we can head back to the applications page. When we return to a location with a reliable internet connection, or in our case, turn our internet back on, the app will send the submission onto its destination and the orange dot will disappear. As a last step, we can hop back over to the submission queue screen to verify that it's empty.

[04:03] Offline Mode offers us an enhanced workflow for forms without missing a beat, wherever we might roam. With a few simple steps in the designer and the app, we can successfully manage our form data with or without an internet connection.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.