Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Suggested answer

Filter Gallery by Supervisor looking up the value in another Dataset

(2) ShareShare
ReportReport
Posted on by 121
Hello Everyone :)

I'm trying to filter a gallery by the current user of the app which at the same time is the supervisor of the agents that should appear on the gallery (each agent has a dedicated ticket).
The Supervisor information is taken from a second dataset.

Therefore, I set the "Items" attribute of my Gallery with the following formula:

Filter(
    Sort(
        Dataset1,
        'Status (TicketStatus)'.Value,
        SortOrder.Descending
    ),
    LookUp(
        Dataset2,
        AgentDataset1 = Agentdataset2
    ).Supervisor = AppUser
)
 
However, since each supervisor has several agents under his/her lead, the formula retrieves a table that does not filter the Gallery.

Anyone that can support me please?

Thanks
Categories:
  • Suggested answer
    Michael E. Gernaey Profile Picture
    42,798 Super User 2025 Season 1 on at
    Filter Gallery by Supervisor looking up the value in another Dataset
     
    You have this but based on what you said above. (go below please)
     
    Filter(
        Sort(
            Dataset1,
            'Status (TicketStatus)'.Value,
            SortOrder.Descending
        ),
        LookUp(
            Dataset2,
            AgentDataset1 = Agentdataset2
        ).Supervisor = AppUser
    )
     
    #1 example You want  something like  
     
    Now the below is based on the assumption for instance that you linked the Tables by email address for the supervisor, but I don't know that for sure.
     
    Filter(
        Sort(
            Dataset1,
            'Status (TicketStatus)'.Value,
            SortOrder.Descending
        ),
         Supervisor = User().Email
    )
     
     
    #2 Example Let's pretend you did it by an Id field then you would do
     
    Filter(
        Sort(
            Dataset1,
            'Status (TicketStatus)'.Value,
            SortOrder.Descending
        ),
         SupervisorId = LookUp(Dataset2, SupervisorEmail = User().Email).Id
    )
     
    But I need more specific to give you your exact filter. but the above is how you want to do it (structurally)
     
    Your issue is you are literally joining the two together incorrectly because of your lookup
     
    If this helps please mark as such and maybe a like thanks!

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >