ONLINE() expression to detect if the user is connected

ONLINE() expression to detect if the user is offline or online.

For me, the main use would be for Usersettings. AppSheet makes very clear that the user must be online to make changes on Usersettings, but have no barriers for that - the user can change it anyway.

I have some apps with Security Filters based on Usersettings data. If you’re offline, you can make changes, the app doesn’t load the correct data (of course, since you’re offline), but the USERSETTINGS() fields are updated anyway.

This results in many entry mistakes that I think we could avoid simply by making these fields editable only if online.

Note: This is a Feature Request, but also a question if someone have any ideas of how to overcome this problem.

Hey @hcquadros

You might check out this post:

If you were to implement a user table, and store your global variables there, then the whole offline-online thing doesn’t really matter anymore - everything is stored locally on the device and works “internally” (if you will).

1 Like

I use this on some apps (exactly using your Tips & Tricks post as reference - thank you by the way), but on other apps, its a matter of scalling.

For apps that use a lot of data, I need Security Filters or it becomes unusable. The user must load one set of data at a time (for exemple, in a inspection app, load and store all the inspection history for an specific client - he cannot load the inspection history for every client at once).

In these cases, I cannot store everything locally in order to fully work offline*

*Just to clarify, I’m not requesting a new offline approach by Appsheet. I just want to limit what the user can and cannot do while offline - thus an ONLINE() expression.

2 Likes

For apps that use a lot of data, I need Security Filters or it becomes unusable

Did you know that you can use a Current_User (slice) in your security filters???


But I get what you’re saying; I can see a few uses for something like this that could be handy.

1 Like