cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Silias
New Member

Using Variables to choose Column in Gallery

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?

4 REPLIES 4
PG_WorXz10
Community Champion
Community Champion

Hi @Silias ,

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

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Hi @PG_WorXz10 ,

 

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.

Hey! ThisItem.CurUser does not exist.

You have CurUser.Email or CurUser.FullName

 

LookUp(List; Email = CurUser.Email)

 

This will return the item 

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

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,980)