How to Set Dropdown Value on OnVisible in Power Apps?

Do you know how to set the Power Apps dropdown value on OnVisible property? In this Power Apps tutorial, I will show you how to set up a dropdown value on the OnVisible property of a Power Apps screen.

Power Apps set a dropdown value on OnVisible property

In this section, I will show you how to set a dropdown value on the onvisible property of a Power Apps screen.

Example 1 [Using Collection]

Here, we will set a dropdown value manually using the screen OnVisible property.

On my Power Apps screen, there is a Dropdown control. When the user opens a screen, the dropdown control will bind the values from a collection.

Power Apps set the dropdown value on visible

Follow the below steps to achieve this:

  • On the Power Apps screen, set its OnVisible property to:
ClearCollect(
    col_Products,
    Table(
        {Product: "Laptop"},
        {Product: "Desktop"},
        {Product: "Smart Phone"}
    )
)

Where,

  • col_Products = Power Apps Collection name
  • Product = Collection column name
  • Laptop, Desktop, Smart Phone = Collection column has these values
Set a Power Apps dropdown value on visible
  • Insert a Dropdown control -> Set its Items property to:
col_Products
How to set the Power Apps dropdown value on visible
  • Save, Publish, and Reload the app. When the user previews the app dropdown items will bind as per the screen OnVisible property as shown below:
Set the dropdown value on visible using Power Apps

This is how to set a dropdown value manually using the screen OnVisible property in Power Apps.

Example 2 [Using a SharePoint List]

We will learn how to set a dropdown value on the screen OnVisible property using a SharePoint list.

I have a SharePoint Online list with a column like:

Column NameData Type
CountryTitle
How to set a dropdown value on visible in Power Apps

On my Power Apps screen, there is a dropdown control. When the user opens a screen, the dropdown control will bind the values from the above SharePoint list title column.

Set dropdown value on visible in Power Apps

Follow the below steps to achieve this:

  • On the Power Apps screen, set its OnVisible property to:
OnVisible = Set(vardrp, 'IT Branches' .Title)

Where,

  • vardrp = Variable name
  • IT Branches = SharePoint list name
  • Title = SharePoint list title column
How to set Power Apps dropdown value on visible
  • Insert a Dropdown control, and set its Items property to:
Items = vardrp

Where,

  1. vardrp = Variable name
Set Power Apps dropdown value on visible
  • Save, Publish, and Reload the app. When the user previews the app dropdown items will bind as per the screen OnVisible property as shown below:
How to set dropdown value on visible in Power Apps

This is how to set a dropdown value for the screen’s OnVisible property using a SharePoint list as a data source.

Conclusion

In this Power Apps tutorial, I have explained how to set a dropdown value on the OnVisible property in a Power Apps screen.

You may also like: