web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Filter records viewed ...
Power Pages
Unanswered

Filter records viewed in list based on current user information

(0) ShareShare
ReportReport
Posted on by 8

Hello!

I am currently building a simple PowerPages application where I will have users from multiple different companies log in and send forms, or wishes in this case, of other companies they would like to meet during a trip.

 

I have my users in the Contact table, and every contact is connected to a company through the "Name of organization" column.

When they log in and send a form with a wish, I have a hidden text field that is prefilled with "Site visitor profile data" > "Name of organization". That way, the name of the organization that the user is connected to gets sent to my "Wishes" table.

 

Now, I have a list on my page that displays the records from the "Wishes" table.

The main question I have, is how can I add a default filter or view that only displays the records where "Name of organization" is the same as the name of the organization connected to the current logged in user?

 

I know I can get the name of the organization using {{ user.adx_organizationname }}, but I have not been able to implement that into a view or filter.

 

Anyone have an idea?

Categories:
I have the same question (0)
  • Rupinder Profile Picture
    26 on at

    Hi, 

     

    I have implemented something similar using the following tutorial. I have Account table which holds information about the companies. Then I have contacts which are associated to individual companies. Account - Contact (many-to-one) relationship. The setup table permissions > Access type "Account access" on the table where account information is held, in my case Jobs in the screenshot below. I hope helps.

     

    Tutorial: Display data securely on your site | Microsoft Learn

     

    Rupinder_0-1709639564556.png

     

  • Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    First you need to resolve the text field that is holding the company.  For the security model to work you need this to be a Lookup (not text) to Account.  If your portal users are already associated with the Account record when they make the first form submission, you can use JavaScript/JQuery or Form Metadata to populate the account (my preference is always a metadata record, but may not be suitable for some scenarios).

     

    If your portal user is not already linked to the account and they are typing in random text, then you will either need to resolve that Text to or create an Account record based on it, depending on your scenario this would be via a Plugin, Workflow, Flow, or if it is suitable for your scenario the portals Web API.

  • Hagru Profile Picture
    8 on at

    I think my problem stems from the fact that my "Account" lookup on the Contact form is not working properly, and only displays other contacts in that lookup, even though the account table is full of records. This stopped me from being able to connect a contact to an account, and that is why the permission par that @Rupinder suggested did not work for me.

     

    As this is a temporary page either way, I let each company have one main user, and display the records connected to the logged in user instead.

     

    I think if my Account field on contacts wasn't broken, this would've worked really well.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 64

#2
DP_Prabh Profile Picture

DP_Prabh 34

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 30 Most Valuable Professional

Last 30 days Overall leaderboard