cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jp9
New Member

restricting choice in form based on lookup

Hello all, I have a question about how to approach limiting choices in a choice column/option set based on another value.

 

MS's documentation gives the example of creating a Pet table with a Choice column for Species and Text column for Breed. Suppose you wanted to instead select from a list of Breed options restricted by Species--obviously you shouldn't be able to select "Labrador Retriever" for Breed if Species is "Cat."

I'm comfortable with filtering data sources dynamically in Canvas Apps. I'm wondering how you would approach this in a Model-Driven app. What's the most sensible way to restrict Breed options based on Species when new pets are entered with a form? Would you do some sort of lookup from a Breeds table, or would this be better handled with a Business Rule? Or something else altogether?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
a33ik
MVP

Hello,

I believe that's a good application for my Dependent Optionset Control. Check the documentation for it - https://github.com/AndrewButenko/ABControlsToolkit/wiki/Dependent-Optionset-Control

If you don't want to download and install the toolkit and want to use the solution as is you will have to develop some additional JavaScript that will perform the filtration - https://www.crmanswers.net/2020/09/dependent-option-set-manager.html

If you want to go code-less way then you will have to rearchitect your solution and use lookups instead of optionsets (choices). Check this post - https://powerobjects.com/tips-and-tricks/how-to-use-dependent-lookups-for-dynamics-crm-201320152016/

View solution in original post

2 REPLIES 2
a33ik
MVP

Hello,

I believe that's a good application for my Dependent Optionset Control. Check the documentation for it - https://github.com/AndrewButenko/ABControlsToolkit/wiki/Dependent-Optionset-Control

If you don't want to download and install the toolkit and want to use the solution as is you will have to develop some additional JavaScript that will perform the filtration - https://www.crmanswers.net/2020/09/dependent-option-set-manager.html

If you want to go code-less way then you will have to rearchitect your solution and use lookups instead of optionsets (choices). Check this post - https://powerobjects.com/tips-and-tricks/how-to-use-dependent-lookups-for-dynamics-crm-201320152016/

Thank you for the resources; I'll take a look. Looks like this was asked here too and there are some resources mentioned that both do and don't use code. I imagined there would be a simpler solution because this seems like a pretty obvious feature to me, but that's been a lot of my experience with the Power Platform so far

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Users online (5,167)