web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Combo Box - On Change ...
Power Automate
Unanswered

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  

 

Categories:
I have the same question (0)
  • Verified answer
    abouchaalaBAIT Profile Picture
    930 Moderator 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.
     

  • Sam218 Profile Picture
    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 

  • abouchaalaBAIT Profile Picture
    930 Moderator 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
    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!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard