Hi, In multi-users/one-datafile (each user with different login) scenario, how can I create an usersettings enum listing which is customized for each one of users? (ie, each user may have several properties/facilities, enum-selected prior to data entry, for security filter). Currently my app is designed for single user and I am using multiple tables for the user, but all these tables are in a single Google sheet file (workbook). Was planning to use one workbook per user but seem not possible without bussiness plan. Can you confirm that usersettings() enum selection option is fixed, per app, for multiple users? (List of enum items cannot be different for each username() ) And if this is the case, If I have to use only one Google sheet file for data of all users, how can I solve custom usersettings_enum per unique user problem?
@Alper You can use a Valid_If in your user settings column to create a dynamic drop-down. Depending on the userโs email address, the Valid_If expression will create a different list of options. Hereโs an example using the SWITCH() expression:
SWITCH(USEREMAIL(), "user1@appsheet.com", LIST(โuser1option1โ, โuser1option2โ), "user2@appsheet.com", LIST(โuser2option1โ, โuser2option2โ), โฆ)
More information about the SWITCH expression can be found here:
help.appsheet.com - SWITCH() SWITCH() help.appsheet.com
Maintain a separate table with email (Email) and tags (EnumList) columns, then the user setting Valid_If can be =LOOKUP(USEREMAIL(), โMyTableโ, โemailโ, โtagsโ).
Or maintain a separate table with email (Email) and tag (Enum) columns, then the user setting Valid_If can be =SELECT(MyTable[tag], ([email] = USEREMAIL()))
@Harry +Steve Coile Thank you very much to both of you, I will inspect both solutions to choose best fit. Meanwhile, I was thinking for another way to make it, wanted to share. Normally I am using a separate table with a single row to read settings of the user. Since it was always single row, I was reading it directly or with index(sheet[column] , 1). If I add more lines by manually entering the settings one-row per user, and than apply security filter to keep it one line all the time, that seem also work.
If the table is guaranteed to be only a single row, ANY() is shorter than INDEX().
Great!
User | Count |
---|---|
32 | |
31 | |
30 | |
19 | |
17 |