Hi,
I'm really hoping someone can help me with in theory an easy Query.
I'm creating an Hours Bank Calculator that pulls the sums for Staff Members from a SharePoint List.
I have created a Combo Box with three labels underneath. The Combo Box is linked to the list and pulls through the Staff names with this code.
Sort(ForAll(Distinct(Filter('Employee Hours Summary', Status.Value = "Active"),'Employee Name'.DisplayName), {Result: ThisRecord.Value}),Result)
My labels are called EHS_Contact , EHS_NoneContact and EHS_SO
When you select the staff member from the Combo Box I want the Labels to populate with their Hours from the list.
I'm unsure how to do this I assumed I went to the on change on the Combo Box and write EHS_Contact. Text = 'Contact' Contact is the name of the column I want to pull from the sharepoint list.
Any help would be amazing and I would be grateful, I can code in VB.Vet but I'm very new to Power Apps.
Thank You
I understand now thank you for your help!
I mean you have to apply a filter to get the SharePoint item that match the selected value.
Here is the reference of the Lookup function : Filter, Search, and LookUp functions (contains video) - Power Platform | Microsoft Learn
I can provide the final instructions if you provide more details (SharePoint list content, Fields type etc ...)
Here is an exemple on how to get a SharePoint item from IceCream SharePoint list by filtering a text column with Vanilla value.
LookUp(IceCream, Flavor = "Vanilla")
----------------------------------------------------------
If I have answered your question, please mark your post as Solved. 🆗✔️
If you like my response, please give it a Thumbs Up. 👍
You can accept more than one post as a solution.
Hi there,
I have tried using the below on OnChange but it errors on the #Filter stating Expected Operator.
Set(varCurrentEHS, LookUp('Employee Hours Summary', #Filter selected value))
I've added a photo of the error I get
Thanks
Sam
Hi @Sam218 , try this :
In OnChange of the comboBox :
Store the current selected from the list
Set(varCurrentEHS, LookUp('Employee Hours Summary', #Filter selected value))
In Text properties of your Labels
varCurrentEHS.EHS_Contact
varCurrentEHS.EHS_NoneContact
varCurrentEHS.EHS_SO
----------------------------------------------------------
If I have answered your question, please mark your post as Solved. 🆗✔️
If you like my response, please give it a Thumbs Up. 👍
You can accept more than one post as a solution.