Create hierarchy views using table views

There is a feature request for Hierarchy views and occasional posts wanting to have some sort of organizational chart.

https://www.googlecloudcommunity.com/gc/Feature-Ideas/Hierarchy-Views/idi-p/261848

The below tip implements the hierarchy view using a table view, of course with some limitations listed below. The main idea is to selectively show the table rows based on user selection. 

The tip basically visually extends the concept described in the "Team Directory" sample app (https://www.appsheet.com/templates/Teammate-contact-details-and-shared-resources?appGuidString=7ffea... ) to make it more presentable in a single view. So thanks are due for the concept of self referencing to the creator of sample app "Team Directory". I have used that sample app to modify further.

Edit: (17 April 2024)

Here is the sample app

Hierarchy Charts

Please read the description to use various views in the app.

Please use the icons in the first column ( as highlighted below) to expand /collapse the organization of a name.

Suvrutt_Gurjar_0-1713360823197.png

Principle

 

Show More

Principle: The sample app and the app in the tip has a table with  a column called "Manager" that is a self reference to itself.  This helps define the hierarchy structure. Of course the tip has many added functionalities ( actions, slice , format rules and some images to visually construct hierarchy structure through connecting lines)

When the user taps on the the inline action in a row, that row is selected or deselected ( by setting a column in that row). This set/reset column in is used in the slice  to select/deselect the children rows  where the parent ( or manager) row has been selected.  The table view based on slice then presents the org structure by showing those selected rows. 

There is some additional work to include images in different image columns as per hierarchy level so the org level structure is visually shown. These images also include the (grey connector lines  อฐ) that show up suitably depending on level and selection.

 

Link to  1 minute demo videohttps://www.loom.com/share/07ee449861fb425e98d782141be575c9

A screenshot of the Org chart from the app: 

Org Chart-1.png

Some challenges and peculiarities  to note: I believe the system will work for multiple users also, as the logic takes care of storing the selection status separately based on each user. However extensive testing on simultaneous use by multiple users still remains. Should work well for a single user at a time though.

The hierarchy depends on a serial number structured column.  So the addition of new team records needs to be done by only one person at a time. However I believe in most organizations , the employee  table is anyway managed by a select team.

Hope this helps

19 19 2,020
  • UX
19 REPLIES 19

Wow, that's really cool! I had zero idea that your screenshot was an Appsheet app at first. Well done.

Aurelien
Google Developer Expert
Google Developer Expert

Awesome trick @Suvrutt_Gurjar ! I'm amazed ๐Ÿ˜

Hello Suvrutt, can you please look at my post and reply. Thanks!

Amazing @Suvrutt_Gurjar !!! Thank you!

Good trick @Suvrutt_Gurjar 

I noticed the HierarchyRank column, it seems like it's the one making all the magic stuff.

I think that your trick would benefit from hiding that column and just making it sort based on it on the view's config.

Also, I think that we can't prevent users from sorting on just one table, it's applied on all of them. This view would benefit from a "prevent sorting" on each view that's table viewtype. If it's not a feature request about it, I'll make it

Hi @SkrOYC ,

Thanks for your insights. Yes, you are correct that [HierarchyRank] columns decides hierarchical structure. Yes, it is correct that one should hide that column in actual implementation. Just retained it for the demo app.

Yes, you are correct about sorting of table issue being univerally applied to all the tables. My thought would be to use another app that just shows this Org structure by reading just the required underlying table(s) and preventing sorting on it.

Thank you for your just the right analysis. Appreciate.

 

 

@Suvrutt_Gurjar Is this app available for Public View?

Hi @Rahul_Sanghavi ,

I do not have this as a public app.

I do have this test app in front of me as below. However it is an old test app built on top of another sample app and it also has some extra functionality that I used in other tips such as a FAQ page etc.. Sharing it as it is may confuse you. 

Suvrutt_Gurjar_1-1703573503931.png

What I can do is , I will try to create a clean , compact app for the desired functionality and then I can share it with you in another few days.  However, please note that I will need some time to create a clean, compact app.

@Suvrutt_Gurjar  - could i get a copy of that app?

WOW. that would be great. thanks.

@Suvrutt_Gurjar Thanks for putting in effort and making an app for me. Thank you. I just saw the app and its beautifully made with multiuser capability.

 

@Rahul_Sanghavi - Would you be able to make a copy of the app that @Suvrutt_Gurjar sent you?

Sure if @Suvrutt_Gurjar doesn't mind.

I deleted all the records just to check the app completely. 

Now i wanted to enter the TOP level persons name but i couldnt since the database is empty.

Do i have to enter the TOP level persons entry manually in the google sheet?

Yes, please note that any sample/template  app is a demonstrative app to demonstrate a concept, idea, workaround or approach.  

Anyone using it will need to use it as a template app and build on exact logic required for her/his requirement.

So to respond to this particular question, you could modify the constraint expressions so that a top level person is not required by default or add one manually. 

Also please feel free to make any other changes you would need. The template basically demonstrates a way of visually expanding/collapsing records as per hierarchy levels.  

Hi, @Suvrutt_Gurjar do you mind sharing this AppSheet with me?

Here is the sample app.

Hierarchy Charts

Please read the description to use various views in the app.

Please use the icons ( highlighted below) in the first column of the dashboard view to expand /collapse the organization of a name.

Suvrutt_Gurjar_0-1713360823197.png

 

I have also updated the original post.

Thanks million for your sharing. well received ๐Ÿ˜Š

Noted. Thanks. Yes i am customising it to my requirements.  

Top Labels in this Space