Hi, In multi-users/one-datafile (each user wi...

Alper
New Member

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?

0 5 773
5 REPLIES 5

Harry2
New Member

@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()))

Alper
New Member

@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().

Alper
New Member

Great!

Top Labels in this Space