cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SandraSoniec
Helper II
Helper II

How to query hierachy data using advanced find?

Hi community,

In my business scenario, I need to deal with hierachy data. I have built a custom entity, the one-to-many relationship and enabled hierachy settings, sample data in. Started exploring with advanced find but couldn't find the "under / not under" commands (as suggested in the microsoft docs) to query from root node over all children. Is fetchXML needed to this task? Directions welcome!

2 ACCEPTED SOLUTIONS

Accepted Solutions
summitb
Power Participant
Power Participant

With model driven, It's not possible. But you can create a Canvas based PowerApps and have it embed in the Model Driven app. Or create a webresource that achieves what you are expecting.

View solution in original post

@v-jefferni and @summitb FYI further tested out advanced find.

If the entity contains one-to many self-references defined as hierarchy relationship you can select the Unique ID of a record and use the "above" or "under" operator in the condition to find all ancestors or children.

 

Advance find.jpg

Further information can be found here 

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/query-hierarchical-data#con...

View solution in original post

5 REPLIES 5
v-jefferni
Community Support
Community Support

Hi @SandraSoniec ,

 

Sorry for the delay.

 

For your question, it could be a little difficult to get an answer here in PowerApps forum, I recommend you to search in the Dynamics365 forum since there might be similar scenarios and solutions of them:

https://community.dynamics.com/ 

 

However, I have found some threads or blogs which look could be helpful:

https://softnovation.wordpress.com/2017/07/30/query-hierarchical-data/ 

https://docs.snowflake.com/en/user-guide/queries-hierarchical.html 

 

Hope this helps.

 

Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
summitb
Power Participant
Power Participant

With model driven, It's not possible. But you can create a Canvas based PowerApps and have it embed in the Model Driven app. Or create a webresource that achieves what you are expecting.

View solution in original post

@summitb Thanks directions. Will use embedded canvas approach for now. Web resources appears to be useful for my app too.

Glad to have helped you with solution @SandraSoniec 

@v-jefferni and @summitb FYI further tested out advanced find.

If the entity contains one-to many self-references defined as hierarchy relationship you can select the Unique ID of a record and use the "above" or "under" operator in the condition to find all ancestors or children.

 

Advance find.jpg

Further information can be found here 

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/query-hierarchical-data#con...

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Users online (3,229)