web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to query hierachy ...
Power Apps
Answered

How to query hierachy data using advanced find?

(1) ShareShare
ReportReport
Posted on by 128

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!

I have the same question (0)
  • v-jefferni Profile Picture
    on at

    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.
  • Verified answer
    Summit Bajracharya Profile Picture
    on at

    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.

  • Sandra Soniec Profile Picture
    128 on at

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

  • summitb Profile Picture
    on at

    Glad to have helped you with solution @SandraSoniec 

  • Verified answer
    Sandra Soniec Profile Picture
    128 on at

    @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#condition-operators-for-hierarchical-data 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard