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 / Using Variables to cho...
Power Apps
Unanswered

Using Variables to choose Column in Gallery

(0) ShareShare
ReportReport
Posted on by 2

I'm just starting out and I have some trouble with my app. At the start-up I set my "CurUser" variable to my User().Email and substitute the "@" and ".".

Afterwards I am going into a "Detail Gallery" that has a filter set to a specific item ID. Now I want to have  label that displays the Value of my current User (like ThisItem.CurUser) , but I can't get it to work as LookUp just returns the text value and most other things give me an Error.

 

Does anybody have an idea on how to approach this?

Categories:
  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @Silias ,

    If not text value what is the value you want to compare ? 

  • Silias Profile Picture
    2 on at

    Hi @PriyankaGeethik ,

     

    I indeed want to compare two text values. The name of the Column and my Variable, but for some reason the LookUp and likes Function don't like using a Variable for the Column Name.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey! ThisItem.CurUser does not exist.

    You have CurUser.Email or CurUser.FullName

     

    LookUp(List; Email = CurUser.Email)

     

    This will return the item 

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @Silias ,

     

    CurUser=User().Email (eg: xyz@email.com)

    This is a variable you can print in a lable but if you want this value in a gallery for all the items this will be CurUser.
    But In case you want this value to Lookup any value from Gallery collection than you can use below formula

    Lookup(DataSource, EmailColumnName=CurUser).ValueRequired

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard