How to Build Model Driven Apps Cascading Lookups in Dataverse ๐ ๐ปโโ๏ธ
In this video, Brian Knight from Pragmatic Works demonstrates how to set up cascading lookups in a model-driven app using Dataverse. This is an essential technique for enhancing user experience and streamlining data selection in your applications. In this concise tutorial, Brian walks through the process of creating a cascading effect between dropdown boxes based on data relationships.
What is a Cascading Lookup?
A cascading lookup allows one dropdown selection to filter options in another dropdown based on the first selection. For example, when you select a company in one dropdown, the second dropdown only displays contacts from that company.
Steps to Create Cascading Lookups
To implement cascading lookups in a model-driven app using Dataverse, follow these steps:
- Set Up Your Data: Ensure that the parent-child relationships are correctly defined in your data model. For example, the Contact table should have a lookup to the Account table.
- Create the Relationship: Make sure that the Contact table has a relationship to the Account table (or similar parent-child relationships, like City to State). This relationship will be the basis for the cascading lookup.
- Edit the Form: Modify the form to ensure that only related records are shown in the lookup dropdown. This step involves configuring the filter for the lookup to only show contacts associated with the selected company (or any other related data).
- Disable Recent Items: By default, recent items may appear in the dropdown. To remove this, disable the recent item feature in the form settings.
- Filter the Records: Set the filter for the lookup to show only related records by adjusting the relationship settings. For example, when selecting a company, the contact lookup will only display contacts associated with that specific company.
- Save and Publish: Once the form is configured, save and publish the changes to make them live in the app.
Testing the Cascading Lookup
After setting up the cascading lookup, refresh your model-driven app to test the feature. Select a company, and the contact dropdown should now show only the contacts associated with that company. Additionally, the "recent" contacts feature should be removed, ensuring that only relevant options are visible.
Application in Real Scenarios
This technique can be applied to various scenarios, such as:
- Business Units: Filter users by business units, showing only employees from the selected unit.
- Geographic Data: Show cities related to a selected state, or states related to a chosen country.
Conclusion
Brian Knight from Pragmatic Works explains how easy it is to implement cascading lookups in model-driven apps using Dataverse. This simple but powerful feature can significantly improve the efficiency of your applications by ensuring users can only select relevant data based on prior choices.
If you found this video helpful, be sure to check out more Power Apps tutorials at Pragmatic Works. The company also offers training, mentoring, and hackathons to help developers master Power Platform tools.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Model Driven Apps and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.
Sign-up now and get instant access
ABOUT THE AUTHOR
SQL Server MVP and founder of Pragmatic Works. Brian has been working with SQL Server as a DBA and business intelligence professional since 1998. He has written more than 15 books on the topic and has spoken at dozens of conferences.
Free Community Plan
On-demand learning
Most Recent
private training

Leave a comment