How to Set Or Get Selected Value From Power Apps List Box?

Are you struggling to know how to set or get selected value from Power Apps list box? If so, you’re in luck! This Power Apps tutorial can easily guide you through setting a list box’s selected value.

You may also be required to get the list box selected value in Power Apps, So here I have shown you how to get the Power Apps List box selected value in the label control.

Power Apps Set List Box Selected Value

This section will cover setting the Power Apps List box selected value.

For Example, I have a SharePoint Online list [Power Platform Training] that has various columns like:

Column NameData type
User IDTitle
User NameSingle line of text
CourseChoice [“Power Apps,” “Power Automate,” “Power Bi,” “Power Virtual Agents”]
Course Start DateDate and time
Power Apps set List box selected value

I created a Power Apps Canvas app and added an Edit form. The form contains a List box control [Course] and a Date picker control [Course Start Date].

When a user chooses a value from the “Course” List box, the “Course Start Date” Date picker automatically selects a corresponding date based on the selected Course, as shown below:

Power Apps List box set selected value

Follow the below steps to achieve this:

  • Sign in to Power Apps with your valid Microsoft 365 Credentials.
  • On the Power Apps screen, insert an Edit form. Then, add a new data source for the above SharePoint list and set the Edit form’s Data source property.
'Power Platform Training'

Where,

  1. Power Platform Training = SharePoint list name
How to set List box selected value in Power Apps
  • Instead of the Course Combo box, insert a List box control as shown below:
Set List box selected value in Power Apps
  • Select the List box control -> Set its Items property to:
Choices('Power Platform Training'.Course)

Where,

  1. Power Platform Training = SharePoint list name
  2. Course = SharePoint list column name
How to set Power Apps List box selected value
  • Select the Date picker control -> Set its DefaultDate property to:
If(
    lst_PowerPlatform.Selected.Value = "Power Apps",
    "01/15/2024",
    If(
        lst_PowerPlatform.Selected.Value = "Power Automate",
        "01/10/2024",
        If(
            lst_PowerPlatform.Selected.Value = "Power Bi",
            "01/25/2024",
            "01/20/2025"
        )
    )
)

Where,

  1. lst_PowerPlatform = List box control name
  2. Power Apps, Power Automate, Power Bi = SharePoint list choice column values
Set Power Apps List box selected value
  • Once your app is ready, SavePublish, and Preview the app when the user selects a value from the List box [Course]. Then, the Date picker [Course Start Date] will automatically select a corresponding date based on the selected course.
Set Selected value of List box control in Power Apps

As mentioned above, I covered setting the Power Apps List box selected value.

Power Apps Get List Box Selected Value

Here, we will see how to get the Power Apps List box selected value to a text label.

Example:

I created a Power Apps canvas app and added a List box and Text label control. Whenever the user selects a value from the list box, the selected value will be displayed in the text label as shown below:

Power Apps get List box selected value

Follow the below steps to achieve this:

  • On the Power Apps screen, insert a List box control -> Set its Items property to:
["HP","Lenova","Dell","Microsoft"]
How to get List box selected value in Power Apps
  • Insert a Text label control -> Set its Text property to:
Left(
    Concat(
        lst_Products.SelectedItems,
        Value & ", "
    ),
    Len(
        Concat(
            lst_Products.SelectedItems,
            Value & ", "
        )
    ) - 1
)

Where,

  1. lst_Products = List box control name
Get Power Apps List box selected value
  • Once your app is ready, SavePublish, and Preview the app when the user selects a value from the List box control. Then, we will get the selected value in a text label control as shown below:
How to get Power Apps List box selected value

This is how to get the List box selected value in Power Apps.

Conclusion

Following our complete Power Apps tutorial, I believe you have complete confidence to implement by Setting the selected value in the Power Apps List box.

Additionally, you have learned how to get the Power Apps list box selected value in the text label control.

Moreover, you may like some more Power Apps tutorials: