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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Display values in text...
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

 

 

Categories:
I have the same question (0)
  • developerAJ Profile Picture
    4,628 on at

    @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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard