cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SandraSoniec
Advocate II
Advocate 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.

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.

@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...

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,047)