User Settings with an initial value

Austin
Participant V

I am using User Settings to grab the users ID, Group, Permission Level and Supervisor for an app. We are running into issues with users who open the app before their user in our database is created so they are not getting their correct settings. We are filling this with an initial value not a Formula. Our reasoning was being able to edit it on the fly for Demo and Debugging purposes. Would there be a way to either allow us, the developers, to edit our settings but force update other users settings whenever they log into the app. Would reset on edit do this?

0 5 700
5 REPLIES 5

GreenFlux
Participant V

Thereโ€™s no way to push new values to the settings table. The user will have to choose to click save on the Settings view. IF they do re-save the settings page, then RESET ON EDIT could be used.

You can set the initial view to a formula, in UX>Options>Starting View, to send them back to the Settings view if the settings they have donโ€™t match the desired values.

Starting View Formula
IF(USERSETTINGS("setting1")<>"desired value", "Settings", "Other Start View")

Note that the user could still choose to click CANCEL instead of SAVE, so you may want to hide other views or add security filters to limit their access until the settings are updated.

Steve
Participant V

User settings columns work like any other columns, so you could set an Editable? expression that evaluates to TRUE only for developers.

To force an update, set a Reset on edit? expression that evaluates to TRUE for non-developers and set Initial value to an expression that pulls values from the database. Make sure the expression produces a safe default when it canโ€™t find the user in the database.

As @GreenFlux noted, the values in user settings only update when the user saves user settings, just as a rowโ€™s normal/non-virtual column values only update when a form is saved.

Steve
Participant V

An alternative to user settings is:

  1. Create a 1x1 worksheet.

  2. Create a table that uses that worksheet.

  3. Add virtual columns to that table that gather the values you want from the database.

  4. Give developers only user settings to override the database values.

  5. Rework the app formulas in (3) to accommodate the settings in (4).

Then a sync is all thatโ€™s needed to update the values in that table.

Austin
Participant V

I can force an update to the user settings by using a formula with a lookup to where I want to pull that value from. The purpose of using the Settings is that I donโ€™t have Lookup formulas executing all over my app and itโ€™s cleaner in code.

Wait that just graphically changes the setting but doesnโ€™t change the actual value. Thatโ€™s kinda bull.

Top Labels in this Space