On starting an App every user profile is available for use based on name and email
To achive this I would:
1. Create a new SharePoint List with 2 Text Columns. Col 1 for the User name and Col2 for User Group
2. Load the list with all your user names and their group. I would use the user profile name not the email as I have found there can be case difference in profile to email. You could also achieve this with a smart startup on the App that if the user does not exist in the list they need to create themselves first. This will ensure both profile name and case are correct
3. When an app starts (OnStart) you do a number of things:
a. create a collection based on the sharepointlist Eg: ClearCollect(MyCollection,SPList)
b. Create a global Variable based on the user name.
c. Set the variable to be User().Fullname. eg Set(Username,User().Fullname)
d. Put a hidden dropdown on the form that will capture the group name. Set its items property to:
Distinct(Filter(CollectionName,namecol=UserName),GroupColName)
This dropdown will now have the result from the Collection that matches the User.
e. Now set the another globlal variable to = the dropdown value. EG: Set(UserGp,Dropdown1.Selected.value)
At the end of startup you will now have two variables with the username and group
I assume there is a group column in your main list?
4. Now I would simply filter any gallery to include the UserGp variable eg:
Filter(SPList,GROUPColumn=UserGp)
You can use the above filter with sort etc
Hope that all makes sense. Others may have a better way. You could also create the user column to be a people column to improves matching, but this adds complexity to the extraction
As I said at the start you can get the user do all teh work by having a start up filter that looks for the user name in teh collection and if not found, takes them to a new screen where they must add their group. When you save patch this gp and teh user login profile name to the list and they will now be there. All you had to do was create the list