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
Resident Rockstar
Resident Rockstar

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.

Nogueira1306
Community Champion
Community Champion

Hey! ThisItem.CurUser does not exist.

You have CurUser.Email or CurUser.FullName

 

LookUp(List; Email = CurUser.Email)

 

This will return the item 

PG_WorXz10
Resident Rockstar
Resident Rockstar

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,184)