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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (5,106)