Skip to main content

Notifications

Power Pages - Customize & Extend
Answered

Filter the Power page list based on logged in user

(0) ShareShare
ReportReport
Posted on by 16
I have a use case to list the tickets assigned to a user in Power pages. I am using OOB list control and showing data from view.
I have a primary assignee column which looks up to contact table. I have used Portal Attribute filter condition option to show only  tickets assigned to the logged in user and this is working fine
Now I have a use case where I need a new column secondary assignee which again looks upto contact table.
So when a user logs in, he should see tickets where he is either a primary or secondary assignee. 
How do I achieve this? How to filter against multiple columns based on logged in user.
Categories:
  • CU09120643-0 Profile Picture
    CU09120643-0 16 on at
    Filter the Power page list based on logged in user
    Thanks Fubar for the help. It did resolve the issue
  • Suggested answer
    Fubar Profile Picture
    Fubar 7,675 on at
    Filter the Power page list based on logged in user
    You don't make it dynamic - in the view definition you just select any contact record (or create a new one specifically for this purpose) - the system will automatically replace it at run time with the currently logged in portal user's contact record (this is documented somewhere, but not always easy to find in the doco). 
    (before Microsoft bought the Portal, they used to provide their own contact record named Portal User and you would select that one - but Microsoft has stopped creating that Contact record by default)
  • CU09120643-0 Profile Picture
    CU09120643-0 16 on at
    Filter the Power page list based on logged in user
    I have tried the option with table permissions and it did work. However I later realized that some of the assignees are also having admin privilege where they get to see all tickets in a different page. Due to this admin privilege is overriding the other permission.
     
    Fubar, could you please help with the second option you mentioned.
    I tried adding filter to view, but when I am selecting Assignee column(lookup to contact), in equal to condition, I am seeing a list of all my contacts. I am not able to figure out how to make this dynamic.
    Any help is appreciated
  • Verified answer
    Fubar Profile Picture
    Fubar 7,675 on at
    Filter the Power page list based on logged in user
    How you may achieve it depends on other requirements:
    • If the user is only to see records from those 2 fields then create 2 Table Permissions (1 for each lookup relationship) as per Oliver's suggestion. This is also the most secure option.
    • If you have the case where the user needs to see other records also, then add filter criteria to the View definition in dataverse  - create an OR condition for the 2 Lookups and populate them with an existing Contact record (the system will replace the Contact in the Lookup in the view definition with the currently logged in portal user)
  • Suggested answer
    oliver.rodrigues Profile Picture
    oliver.rodrigues 9,048 on at
    Filter the Power page list based on logged in user
    Hi, instead of using the Filter option, you should look at Table Permissions to properly secure your data.
     
    You can create two permissions, one for each lookup, and this should grant the users to view the tickets if they are either the primary or secondary assignee.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard

Featured topics