Hello,
In "Data", "Table", "Are updates allowed?" There is a default formula and I tried to rewrite it as below:
SWITCH(USEREMAIL(),
any(select(AddsOnlyTable[AddsOnlyColumn],true)), "ADDS_ONLY",
"myemail@gmail.com", "ALL_CHANGES",
"READ_ONLY")
What I want to do is trying to limit a user email list - AddsOnlyTable[AddsOnlyColumn] who can add only.
However it doesn't work as expected. May I know how can I rewrite it and make it works?
Thank you.
Solved! Go to Solution.
Hello @LawrenceMa, I suggest you implement a current user system for this, I believe it is the best way to go around it.
In any case, you could try this expression for solving your inmediate query:
SWITCH(USEREMAIL(),
INDEX(INTERSECT(list(useremail()),AddsOnlyTable[AddsOnlyColumn]),1),"ADDS_ONLY",
"myemail@gmail.com","ALL_CHANGES",
"READ_ONLY")
Hello @LawrenceMa, I suggest you implement a current user system for this, I believe it is the best way to go around it.
In any case, you could try this expression for solving your inmediate query:
SWITCH(USEREMAIL(),
INDEX(INTERSECT(list(useremail()),AddsOnlyTable[AddsOnlyColumn]),1),"ADDS_ONLY",
"myemail@gmail.com","ALL_CHANGES",
"READ_ONLY")
Hi all, could you plz explain this code for me.
and why did you add "1"
SWITCH(USEREMAIL(), INDEX(INTERSECT(list(useremail()),AddsOnlyTable[AddsOnlyColumn]),1),"ADDS_ONLY", "myemail@gmail.com","ALL_CHANGES", "READ_ONLY")
I've applied your code into my app:
SWITCH(USEREMAIL(),
INDEX(INTERSECT(list(useremail()),Sellers[Email]),1),"ALL_CHANGES",
"READ_ONLY")
User | Count |
---|---|
35 | |
9 | |
3 | |
3 | |
2 |