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 / Pass a gallery label t...
Power Apps
Unanswered

Pass a gallery label to a collection to get another dynamic gallary label item

(0) ShareShare
ReportReport
Posted on by 33

Hi All

 

I have a gallery with a collection as a DataSource. I am editing the item labels and would like some data from another collection brought in as well. I would like to only bring back a single value using the ThisItem but can not get it to work. If I substitute text in the lookup it works fine, but if I try to use the ThisItem.type which is the same Text, it doesn't work.

The collection is as follows:

 

ClearCollect(BalanceCollection,
 {
 EmployeeEmail: _myProfile.UserPrincipalName, 
 EmployeeName: _myProfile.DisplayName , 
 Year: Text(Year(Now())), 
 Vacation:19, 
 VacationUsed:0, 
 Sick:8, 
 SickUsed:0, 
 Floating:8, 
 FloatingUsed:0, 
 JuryDuty:3, 
 JuryDutyUsed:0, 
 Bereavement:5, 
 BereavementUsed:0, 
 BalanceID:_myProfile.UserPrincipalName&Text(Now(), "[$-en-US]mm-dd-yyyy-hh-mm-ss-fff")
 }
)

 

Using text for the First(BalanceCollection.Vacation).Vacation returns a 19 as required, but I want to pass the various Gallery items i.e. Vacation, Sick-Leave etc from the gallery ThisItem.type and have something like this:

First(BalanceCollection.ThisItem.type).ThisItem.type BUT this obviously doesn't work. 

 

troyrowlands_0-1708033104319.png

 

Any assistance. I am new to PowerApps so it is most likely something simple, but I have tried and tried and not succeeding. 

 

Thanks

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Column names have to be static references, would be better to do something like

    Switch(WhateverControlSelectionSignifiesOneToLookAt.Value,
     "Vacation", First(Balance.Vacation).Vacation,
     "Sick Pay", First(Balance.Vacation).SickPay,
     First(Balance.Vacation).Other)
    

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard