Hello,
Im developing an app using appsheet and i want to control privileges over different tables, but i have a problem with the formula of the โAre updates allowed?โ field.
This is the formula im using
SWITCH(LOOKUP(USEREMAIL(),โusuariosโ,โemailโ,โrolโ),
โRTโ, โUPDATES_ONLYโ,
โadministradorโ, โALL_CHANGESโ,
โREAD_ONLYโ
)
But im receiving an error:
SWITCH function is used incorrectly: Cannot convert input 2 of type โTextโ to โList of Textโ
Cant understand why since data types and args seems to be correctโฆ
Thank you very much!
Solved! Go to Solution.
Hello @Hernan_da_Silva, welcome to our community !
Is your โrolโ column in your โusuariosโ table an Enum of base type text?
Also do check this post out, it makes handling user permissions waaaaaaaaaaaaaaay easier:
I believe youโre just one slice away from having it completely set up.
Hello @Hernan_da_Silva, welcome to our community !
Is your โrolโ column in your โusuariosโ table an Enum of base type text?
Also do check this post out, it makes handling user permissions waaaaaaaaaaaaaaay easier:
I believe youโre just one slice away from having it completely set up.
Rafael, thank you very much for your quick and correct response!
Yes, you were right, insted of Enum, EnumList was being used, such a stupid error.
Thanks for your suggestion about slices. Currently im using security filter, because i definitevely donโt want any data to be access by users who shouldnt have that possibility, that is managed through another column in that same users table.
Again, thanks!
User | Count |
---|---|
33 | |
30 | |
30 | |
19 | |
17 |