Skip to main content

Notifications

Power Automate - General Discussion
Answered

Combo Box - On Change - How to change the text on labels depending on value in the box.

(0) ShareShare
ReportReport
Posted on by

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  

 

  • Sam218 Profile Picture
    Sam218 on at
    Re: Combo Box - On Change - How to change the text on labels depending on value in the box.

    I understand now thank you for your help!

  • abouchaalaBAIT Profile Picture
    abouchaalaBAIT 930 on at
    Re: Combo Box - On Change - How to change the text on labels depending on value in the box.

    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.

  • Sam218 Profile Picture
    Sam218 on at
    Re: Combo Box - On Change - How to change the text on labels depending on value in the box.

    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 Error .png

    Thanks 

     

    Sam 

  • Verified answer
    abouchaalaBAIT Profile Picture
    abouchaalaBAIT 930 on at
    Re: Combo Box - On Change - How to change the text on labels depending on value in the box.

    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.
     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard