Hi
@timl
You helped me loads with previous related questions to what am I further needing help with:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Help-with-filtering-a-gallery/m-p/1878169#M473014
I now need to look at 5 SQL views to store which location the user belongs to. The Ugroup column contains the users region but the logged in user can be in 1 of 5 different DBs.
Previously your suggestion worked brilliantly when it needed to look at 1 view in the single DB:
Set(varUgroup,
LookUp(Uview, UserEmail=User().Email).Ugroup
);
Set(varAllowOverride,
User().Email in Filter(Uview, DCode = "GT345").UserEmail
);
The team have now changed the structure, and separated the regional data, meaning there are now 5 DBs to search through for the 1 user.
What is the best option for me to find which location the logged in user belongs, can the above code be enhanced to cater for this? Maybe a switch function, I am obviosuly concerned about the performance hit this may have as it will be making a call to 5 DBs.
I would need to search through the same 5DBs to see if the user is an admin where varAllowOverride comes in to play too.
Apologies it's been a while so please feel free to ask any questions to see if you can help me?
Thanks