Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Cascading Dropdown with Self-Referential Table?

(0) ShareShare
ReportReport
Posted on by 6

(Hello! First time poster, open to suggestions about most efficient way to ask questions)

 

I have a hierarchical/self-referential table that contains categories of laboratory equipment. (Table is in dataverse, this table is one of many that will be used to build Powerapp driven equipment management.)

I am trying to figure out how best to have users receive equipment and place it into the proper category, using Powerapps.

There is great variety in the types of equipment in the lab - and it is best to categorize in some fashion.

 

Table structure is:

EastCoastNovice_0-1653236125583.png

(I have enabled hierarchy on this table - and it all looks like correct under the hierarchical view in the model-driven app).

Current table looks like this:

EastCoastNovice_1-1653236336180.png

I have two top level categories (Information Technology and Lab Equipment).

After that there are various layers in the hierarchy that allows one to drill down w/o putting a hard limit on levels.

(I like the self-referential table approach - as the layers of nesting required for all the categories I will eventually build out will vary quite a bit in depth. I'd like to avoid a flat table with multiple columns that either won't get used, or having to keep adding on columns.)

 

My issue is with how best to have users navigate the selection of equipment category upon receipt. If the user is seeing the entire table records with no sorting -it makes category selection difficult. 

 

I was thinking that cascading drop-downs were the way to go.

 

For my  first drop down, I was able to solve this by filtering on "IsBlank" on the Parent Category, which only displayed records which are therefore top level:

 

EastCoastNovice_2-1653236637554.png

This properly returns only those categories which have no parent (Lab Equipment and Information Technology)

 

I run into trouble on the second drop down (and assumably every drop down thereafter) -because I'm comparing record to a text:

EastCoastNovice_4-1653236781490.png

My take on this is that I'm trying to compare the "Parent Category" lookup to the "Category" text field, and thereby returning the error.

 

So - am I even approaching this the right way? Is there a smarter way to get the cascading drop-down selection, or help users navigate what could eventually be a fairly complex category hierarchy?

I recognize that I'll have to have an infinite number of drop-down controls on my PowerApps form - and therefore this feels like the wrong approach intuitively - and yet I do not know what else to do!

 

Many thanks!

 

As an example of some nice navigation, as well as the very high level of category/sub-category hierarchy - check out Fisher Scientific's left-hand navigation bar:

https://www.fishersci.com/us/en/home.html

 

 

 

 

 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: Cascading Dropdown with Self-Referential Table?

    @EastCoastNovice 

    I do it manually. Probably not necessary but that's me. It gives me more flexibility, particularly with the many to many relationship.

  • EastCoastNovice Profile Picture
    6 on at
    Re: Cascading Dropdown with Self-Referential Table?

    Brief follow-up question @Drrickryp 

    You indicate that you always include foreign keys/Primary Key ID columns in your tables - do you do this manually? My impression was that when creating tables in Dataverse, a GUID is automatically assigned in much the same way that the primary/foreign keys would be set up in Access. (Specifically choosing to use Dataverse tables, as Sharepoint lists as data source for anything complex gives me the willies). A blurb here discusses:

    https://subscription.packtpub.com/book/business_and_other/9781838985684/5/ch05lvl1sec81/relationships

     

    When I export the Equipment Category to Excel for inspection, I do see the corresponding GUIDs that line up properly with the unique values for parent/child relationship:

    EastCoastNovice_0-1653312485845.png

    So, it seems like the primary keys/foreign keys are already being set?

     

     

     

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: Cascading Dropdown with Self-Referential Table?

    @EastCoastNovice 

    As you have an Access background, I will use terms that are undoubtedly familiar to you.  I also came from an Access background and am not entirely comfortable with how Dataverse creates the relationships.  I am still learning the nuances of walking the relationships using the dot notation, so I always include foreign keys and Primary Key ID columns to all of my tables and use those to create my relationships, just as you would in MS Access.  It takes some extra work but I am very comfortable with working the backend tables this way. 
    To get your head around what PowerApps does, consider that it is an attractive front end or user interface to your backend tables.  So before getting into the weeds with PowerApps, first ensure your tables are properly constructed and that the relationships are created.  IMHO,  The first step is to identify any one-to- many or many-to-many relationships and normalize your the tables accordingly.  Once this is done, the front end design will flow smoothly.  The cascading dropdowns are simply filtered by the foreign key from the primary key record selected in the dropdown above. 

  • EastCoastNovice Profile Picture
    6 on at
    Re: Cascading Dropdown with Self-Referential Table?

    @Drrickryp Thanks! This is a great design fundamentals write-up - I will recommend it to others.

     

    Yes - trying to pay attention to normalization. I've done a fair amount of work in Access and SP for a few years and I'm 'mostly' familiar with table design. Powerapps is very new to me.

    For this application/question, making the assumption that the Equipment Category table/other tables are normalized (which I agree an assumption that should be verified) - are there any other considerations/approaches to address the user nav of selecting equipment category?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: Cascading Dropdown with Self-Referential Table?

    @EastCoastNovice 

    As a first step, I would recommend reviewing and normalizing your tables to determine where the one to many relationships are. This is a basic step that should precede further development of your app.  Please see my series on database design fundamentals and PowerApps. https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/Database-Design-Fundamentals-and-PowerApps-An-Overview/ba-p/184485  

    It seems that some of the equipment can belong to more than one category and you will need to be able to handle that in your app. 

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1