Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Display values in text labels based on listbox selection

(1) ShareShare
ReportReport
Posted on by 212

I am building a form/questionnaire using powerapps. For question 2, I have a list box with three choices. When a user selects from one of the choices, I want to display the selected value in a label in a preceding question for comment. 

 

mthiru_0023_1-1686144730998.png

For the list box on select property, I have the following code: UpdateContext({ selectedItems: ListBox_Q2c.SelectedItems })

For label one text property: If(
CountRows(selectedItems) >= 1,
First(selectedItems).Value,
""
)

 

For label 2 and 3: I have this expression : If(
CountRows(selectedItems) >= 2,
Concat(
FirstN(selectedItems, 2).Value,
", "
),
""
)

 

I am not able to populate label 2 and 3. It displays ", ," in the label. Do you know what am doing wrong. Is there more simpler solution.

 

mthiru_0023_2-1686144893507.png

 

 

  • developerAJ Profile Picture
    2,855 on at
    Re: Display values in text labels based on listbox selection

    @mthiru_0023 

     

    Concat(
    FirstN(ucselected, 2),Value,
    ", "
    )

    use this formula

    Please click Accept as solution and Thumbs Up. if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard