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 Apps / Filtering a DisplayFor...
Power Apps
Answered

Filtering a DisplayForm using a Variable

(0) ShareShare
ReportReport
Posted on by 30

Beginner PowerApps user here so hopefully this is just a slight oversight on my part and I apologize if this is something I could have easily found in documentation.

 

Scenario:

Screen 1 hosts a variety of galleries. When a user OnSelects one of those galleries, it sets a globalvariable with that item's UPN sourced from Sharepoint List 'Roles' and Navigates to Screen 2 where I would use it to display details from Sharepoint List 'Details' that uses the Global Variable UPN to identify and display that record in a ViewForm.

 

The UPN column exists in both lists and should work as a unique reference between the two lists.

 

I've confirmed that the variable sets properly with the user's UPN. The problem is I can't seem to use that UPN value to filter down the Details sharepoint list. Lookup, Search, and Filter does not seem to work as it sees the variable as incompatible. I keep getting data type incompatibility errors. I can't do the normal "Gallery.Selected" as it is a different data source entirely.

 

What am I missing? I feel like I am missing something super simple here. Any help is appreciated.

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    HI @Arcturos ,

    Can you please share the formula that you are using currently in Item property of form.

    What is the column type of UPN column in both the lists ?

  • Arcturos Profile Picture
    30 on at

    Thank you for the response @NandiniBhagya20 !

     

    Column Type of both columns in both sharepoint lists is just standard text.

     

    Formula in Item property of the DisplayForm is currently: Filter('Details', UPN_DataCard1.DisplayName = Glbl_UPN). 

     

    Glbl_UPN is defined from the first screen, via OnSelect property of one of the Galleries: Set(Glbl_UPN, ThisItem.Title); Navigate(DetailsScreeen). Where ThisItem.Title also references the UPN column of the Roles list.

     

  • Verified answer
    NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @Arcturos ,

    Try using below formula in Item property of your form -

    LookUp('Details', UPN = Glbl_UPN)

    UPN => Column Name of UPN column in DetailsList

    Glbl_UPN => Variable which stores UPN value from Roles list

     

    You can also try using below formula - 

    LookUp('Details', UPN = GalleryName.Selected.UPN)

  • Arcturos Profile Picture
    30 on at

    I thought I tried the lookup function before and it didn't work but trying it again the way you listed did so I guess I somehow had the formatting wrong.

     

    Thank you very much for taking the time to answer a newbie question! The lookup solution worked perfectly.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard