
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.
Any assistance. I am new to PowerApps so it is most likely something simple, but I have tried and tried and not succeeding.
Thanks
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)