Data visibility based on Team

I would like to classify the visibility based on the team the user belongs to in one screen , instead of opening several screen and define which screen mapped with which role and add filter to the aggregage.

I m struggling in how to implement below expectation.

1. I have created a table , user_team

2. Inside the Mainpage\JobMainInfo

- There is "team" in everyrecord

- If I belong to "Testing" in User_Team, when I go to Mainpage\JobMainInfo , I can only see the record which the team I belong to.

- If the users belong to the team "Karen Lau", then they can only see the record with Team"Karen Lau" in this page

3. I have created role: testing (If i should only use the "role" to implement above expectation, how can it be realized?)

Attached is my oml, Would please guide me how to realize it? Or I should use the Role to realize it? Thanks so much.


Hi Winnie Lam, i can't make changes to your oml due to dependencies, I would have to share the producers that are missing. But from what you can tell, the User_Team table is missing and filtering by user, see the image below to tell you if it works 

I am not sure about the approach and requirement but you can fetch the team details of logged in user.

1.What you have to do is on JobMainInfo page add one aggregate which fetches the team from user_team entity of current logged in user adding filter as userid=getuserid() .

2. Now aggregate you are currently using as source to the table on JobmainInfoPage make fetch property of that to on demand and add filter as teamID= current teamid of aggregate we created in first step 

3. For Aggregate we created in first step add onafterfetch event handler and refresh the aggregate mentioned in 2nd step .

This will give you the team data of team logged in user belongs to.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.