Hi, i have a gallery with a sharepoint data source and currently have the items of the gallery filtered so that user can only see what they created. However, i would also like to add an additional email address so that this user would be able to login and see all entries in the gallery. i thought maybe something like If(User().Email=user@bbb.com, true, Filter(KBXoffline, 'Created By'.Email = User().Email)
I currently have this in the items;
Filter(KBXoffline, 'Created By'.Email = User().Email)
Kind regards,
Matt383
Thanks, that works
Yes you need double quotes. If you want more than 1 mailaddress the approach is somewhat different
You have to use
Set(varMyAdminEmail, ["mail1", "mail2" ])
And the formular would be a "in" instead "="
If(User().Email in varMyAdminEmail....
Sorry it is somewhat difficult to write the complete Formular on a. Mobile so I have to shorten it
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thanks for your solution, Just when i put in the email, it has an expected operator error on the email. Do i need to wrap the email in double quotes?
Thanks, do i need to use double quotes around the email. Just getting an error without them Set(varMyAdminEmail, "foo@foo.de") also to add additional users do i just use Set(varMyAdminEmail, "foo@foo.de";"newuser@foo.de")
I am very slow at typing. This is the second time I started to reply to a post with no response and when I finished my reply I see someone had already responded a minute or two earlier (and with a better answer). Sorry @PowerRanger , I don't mean to step on your responses.
If you only have one admin that would but you would need to change true to KBXoffline. If you have more than one admin you might want to create a variable onStart called IsAdmin and set it to true if the the current user is part of your admin list.
If(User().Email=user@bbb.com, KBXoffline, Filter(KBXoffline, 'Created By'.Email = User().Email)
or
If(IsAdmin, KBXoffline, Filter(KBXoffline, 'Created By'.Email = User().Email)
So you want to show all items for a particular user
Use this in the Items property
If(User().Email = varMyAdminEmail, KBXoffline, Filter(KBXoffline, 'Created By'.Email = User().Email))
Place this somewhere else like OnStart
Set(varMyAdminEmail, foo@foo.de)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.