The app we developed requires continuous updates even after its initial deployment.
When performing these updates, such as adding or deleting columns or changing the table structure, errors can easily occur on the user’s side.
This happens because, while the app on the development side is in its latest version, the user may be running an older version. If the user tries to add data using the old version’s table structure, the discrepancy with the new structure causes the action to be rejected, leading to errors.
To prevent these errors, it is necessary to ensure that users perform a sync.
Even if the app is upgraded during non-operational hours at night, as recommended, there is no guarantee that the app will automatically sync when the user opens it the next day. Therefore, users need to be instructed to perform a sync before using the app in the morning. However, in reality, users often fail to follow these instructions, leading to errors, which is a significant problem.
Based on my understanding, the following methods can be used to force a sync on the user’s side, excluding the “Sync on start” option:
- When the Sync button is pressed.
- When performing Add, Edit, or Delete operations within the app.
- When the UserSettings are modified and saved.
Pressing the Sync button (1) is practically difficult, and performing Add, Edit, or Delete (2) in an older version will lead to errors, so this is not a viable option.
I believe the only way to force users to sync is to implement a mechanism where something in UserSettings is modified.
For this, I propose adding a “Last Update Date” column in UserSettings and setting its formula to Today(). This way, every time the user saves the UserSettings, the current date is recorded.
In the View’s “Show if” condition, use the expression usersettings(“Last Update Date”) = TODAY(). This will return true and display the View if the last update date in UserSettings matches the current date.
Conversely, when the date changes, the last update date in UserSettings remains as the previous day’s data, while TODAY reflects the new day. This will return false and hide the View.
By using this mechanism, you can make all Views disappear after the date changes, making the app unusable until the user opens UserSettings, presses save, and performs a sync.
This ensures that even if the app is upgraded at night, users will be forced to sync the next day, thus preventing errors caused by table structure changes.
In practice, I have successfully used this method to significantly reduce problems.
I would appreciate any feedback on this solution or suggestions for better alternatives.