cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Teresa24486
Post Patron
Post Patron

Fetch/drill down options based on other entities/ columns

hi,

Is it possible to fetch/drill down options based on other entities/ columns? Please take a look at the below example:

CATEGORYBRANDSDESCRIPTION
PCHP, Acer, Dell, SonyD1,D2,D3,D4
Watchiwatch, Rolex, Cartier, CitizenD5,D6,D7,D8
Mobile PhonesApple, Samsung, Nokia, SonyD9,D10,D11,D12

I would like the choices filtered based on the value i choose from Category field. From the above e.g. when I choose PC, only the related brands and desc should appear in the brands and description fields and not all.

 

@EricRegnier 

1 ACCEPTED SOLUTION

Accepted Solutions

And do you have a Category lookup filed on Sub-Category entity? If not, create one which will allow you to filter the related sub-categories. You will then need to apply the filtering on the form as per my previous post:

  1. In make.powerapps.com, navigate to your Entity --> Forms and open the desired form
  2. Switch to Classic form designer by clicking the "Switch to Classic" button in the command bar
  3. Select the lookup field and click "Change Properties" in the ribbon
  4. Under the "Related Records Filtering", check "Only shows records where"
  5. Pick the Category lookup field  in the dropdown then in "Contains" the Category related field
  6. I would uncheck "User can turn off filter" so users can't turn off and pick un related sub-categories
  7. Click OK, Save All and Publish

Hope this helps...

View solution in original post

5 REPLIES 5
EricRegnier
Super User II
Super User II

Hi @Teresa24486,

if you’re using entities as your brands and categories than you can filter out-of-the-box. Look at this post for the steps: https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/Filter-LookUp-Field-to-Related-Reco...


If you’re using option sets then you can but will require code with JavaScript.

Hope this helps...

 

 

hi,

lookup shows the value of the primary field of the entity and thats not the lookup field.. how can i have that changed to the lookup field itself?

That's the standard behavior in CDS and cannot be changed.  The primary field has to be a text field (single line of text). What do you mean by "not the lookup field"? Another lookup field on the lookup entity? If you need that, then suggest to setup a workflow (or Power Automate) to update the primary value with the lookup value from that entity.

Hope this helps...

Instead of a workflow, I created separate entities for Category and Sub-category keeping fields category and sub-category as primary fields, then tried to apply filter on the change properties page of the main form of another entity. For some reason the Category loads, sub-category is empty. Not sure i am doing it right.

And do you have a Category lookup filed on Sub-Category entity? If not, create one which will allow you to filter the related sub-categories. You will then need to apply the filtering on the form as per my previous post:

  1. In make.powerapps.com, navigate to your Entity --> Forms and open the desired form
  2. Switch to Classic form designer by clicking the "Switch to Classic" button in the command bar
  3. Select the lookup field and click "Change Properties" in the ribbon
  4. Under the "Related Records Filtering", check "Only shows records where"
  5. Pick the Category lookup field  in the dropdown then in "Contains" the Category related field
  6. I would uncheck "User can turn off filter" so users can't turn off and pick un related sub-categories
  7. Click OK, Save All and Publish

Hope this helps...

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,872)