filmov
tv
Set a Default Value for a Dropdown Menu in Power Apps/Dynamics 365 (Model-driven and Canvas Apps)
Показать описание
In most modern apps, it’s common to need to set a default choice in a dropdown menu. But how can you do this in Power Apps/Dynamics 365? The answer is different whether you’re building a Model-driven app or a Canvas app.
In this hands-on tutorial, I’ll show you my simple datasource setup in Dataverse, and then how you can easily set the default choice if you’re using a Model-driven app. For a Canvas app, we’ll need to do a little bit more work, but I’ll show you two options to make it happen.
00:00 – Overviewing the problem we’re trying to solve, needing a default choice in our dropdown
00:33 – Reviewing my datasource setup with a table and column in Dataverse
01:03 - Setting the default choice on a Choice/OptionSet datatype in Dataverse (but it might not do what you think!)
01:22 – Setting the default choice for a dropdown in a Model-driven Power App
01:44 – Overviewing the parts of the Canvas App we’re working with
02:13 – Unlocking the Datacard that contains the dropdown control
03:07 – OPTION 1: Hard-coding the value of DefaultSelectedItems on the dropdown control in a Canvas App
03:57 – OPTION 2: Setting the value of DefaultSelectedItems using the Choices function in a Canvas App
05:56 – Real-world tips: Checking that the user actually selected something from the dropdown
08:50 – Recapping how to set the default choice for the dropdown
In this hands-on tutorial, I’ll show you my simple datasource setup in Dataverse, and then how you can easily set the default choice if you’re using a Model-driven app. For a Canvas app, we’ll need to do a little bit more work, but I’ll show you two options to make it happen.
00:00 – Overviewing the problem we’re trying to solve, needing a default choice in our dropdown
00:33 – Reviewing my datasource setup with a table and column in Dataverse
01:03 - Setting the default choice on a Choice/OptionSet datatype in Dataverse (but it might not do what you think!)
01:22 – Setting the default choice for a dropdown in a Model-driven Power App
01:44 – Overviewing the parts of the Canvas App we’re working with
02:13 – Unlocking the Datacard that contains the dropdown control
03:07 – OPTION 1: Hard-coding the value of DefaultSelectedItems on the dropdown control in a Canvas App
03:57 – OPTION 2: Setting the value of DefaultSelectedItems using the Choices function in a Canvas App
05:56 – Real-world tips: Checking that the user actually selected something from the dropdown
08:50 – Recapping how to set the default choice for the dropdown
Комментарии