cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnBrown
Level: Powered On

Display Hierarchy with Concat's or something

I have 4 entities in CDM/Dynamics that each have a many to 1 relationship with the entity beneath it. So

A is at the Top with many B's below it and many C's below B and Many D's below C. In the GUI this looks like D has a lookup field to C and C has a lookup field to B and B has a lookup field to A.

 

My questions is how can I take that hierarchy and display it in a Hierarchical fashion. I have attempted this with nested Conccats but can't seem to get it correct and get invalid type error to often once I get into the second concat. Any ideas?

 

Example  Layout:

A1

  B1
    C1

       D1
    C2
       D2

       D3

  B2
    C3
        D4

        D5

    C4

        D6

    C5

        D7

 

 

 

 

4 REPLIES 4
PavanKumar
Level 8

Re: Display Hierarchy with Concat's or something

Hi,

 

There are couple of ways to do that. One of the way is Add nested Galleries.

 

Let me elaborate on how to do that.

 

  1. Create a Main Gallery for A and bind all A datasource to it.
  2. Create Gallery B and in Items property bind all B with filter condition i.e. Filter(BDatasource,AFieldName=thisitem.selected.AFieldName).
  3. Repeat the same for any number of nested galleries.

 

if this answers your question mark it as verified and give it a thumbsup

Regards,

Pavan Kumar Garlapati

Community Support Team
Community Support Team

Re: Display Hierarchy with Concat's or something

Hi @JohnBrown ,

Do you want to display 4 Hierarchy layout within your PowerApps app?

 

If you want to display 4 Hierarchy layout within your PowerApps app, I afraid that there is no way to achieve your needs in PowerApps.

 

Currently, within PowerApps, you could only create a 2 Hierarchy Gallery layout, in other words, you could add a nested gallery within a Main gallery, but you could not add another nested gallery within the above nested gallery (3 Hierarchy Gallery is not supported).

 

As an alternative solution, you could consider create 4 individual Gallery controls to achieve your needs. Each gallery control is corresponding to each Entity as below:1.JPG

Set the Items property of the Gallery1 to follownig:

'EntityA'

Set the Items property of the Gallery2 to following:

Filter('EntityB', LookUpField_BToA.'Primary Name' = Gallery1.Selected.'Primary Name')

Set the Items property of the Gallery3 to following:

Filter('EntityC', LookUpField_CToB.'Primary Name' = Gallery2.Selected.'Primary Name')

Set the Items property of the Gallery4 to following:

Filter('EntityD', LookUpField_DToC.'Primary Name' = Gallery3.Selected.'Primary Name')

Please consider take a try with above solution, then check if the issue is solved. On your side, you could select different items in your Gallery1, then the corresponding child Hierarchy would be shown up within Gallery2, Gallery3 and Gallery4.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JohnBrown
Level: Powered On

Re: Display Hierarchy with Concat's or something

@v-xida-msft,

 

Is the same true when working with Concat() function? I have not been able to get it to work past a second layer.

 

John

Community Support Team
Community Support Team

Re: Display Hierarchy with Concat's or something

Hi @JohnBrown ,

If you want to use Concat function to achieve your needs, I afraid that there is no easy way to achieve your needs. You may need to type multiple nested Concat function within your formula.

 

As an direct solution, I think the 4 Gallery controls may be the better choice for you.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,608)