# Displaying rows a columns in table

**URL:** <https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662>\
**Category:** Ask for Help\
**Created:** [December 13, 2023, 4:08pm UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662 "2023-12-13T16:08:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konstantin\_Demishev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/konstantin_demishev/32/66169_2.png) [@Konstantin\_Demishev](https://community.glideapps.com/u/Konstantin_Demishev)\
**Post date:** [December 13, 2023, 4:08pm UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/1 "2023-12-13T16:08:59Z")

</div>

Hey community,  
I have the following structure in the table (many to many relations):  
Company → State of contract ← Type of Contract

I want to show “Type of Contract” as columns, companies as rows and “State of Contract” as cell value.

Does anyone have an idea how to implement it (or an alternative version) ?

Best Regards,  
Konstantin

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 14, 2023, 2:07am UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/2 "2023-12-14T02:07:30Z")

</div>

So a company can have multiple contracts, each of them having a state?

---

<div class="post-metadata">

**Author:** ![Konstantin\_Demishev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/konstantin_demishev/32/66169_2.png) [@Konstantin\_Demishev](https://community.glideapps.com/u/Konstantin_Demishev)\
**Post date:** [December 14, 2023, 4:21am UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/3 "2023-12-14T04:21:39Z")

</div>

Correct. Even Two companies can have the same contact but with different states.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 14, 2023, 4:24am UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/4 "2023-12-14T04:24:58Z")

</div>

Create a separate table for contracts with columns:

1. contract ID
2. Contractor ID
3. Client ID  
plus whatever columns you need… date, description, price, status, address…

---

<div class="post-metadata">

**Author:** ![Konstantin\_Demishev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/konstantin_demishev/32/66169_2.png) [@Konstantin\_Demishev](https://community.glideapps.com/u/Konstantin_Demishev)\
**Post date:** [December 14, 2023, 5:14am UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/5 "2023-12-14T05:14:18Z")

</div>

I have no problem with the structure of the data table. My challenge is to show this as a pivot view where Company are rows, Type of Contact as columns, and cells are values from the table State of contract

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 14, 2023, 5:19am UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/6 "2023-12-14T05:19:09Z")

</div>

I understand, but trust me, you will have many problems if you stick to your concept… I’ve been doing this for over 30 years.

Have a separate table for contracts, users, and payments. Then, you connect these tables by user ID, contracts ID, and payments ID and filter them out by categories.

The company is a user in your App, the same as clients and admins. The difference will be the role column.

So, if you want to show companies… filter the users table by role companies…and bring related values from contracts

---

<div class="post-metadata">

**Author:** ![Konstantin\_Demishev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/konstantin_demishev/32/66169_2.png) [@Konstantin\_Demishev](https://community.glideapps.com/u/Konstantin_Demishev)\
**Post date:** [December 14, 2023, 8:09am UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/7 "2023-12-14T08:09:03Z")

</div>

Let me simplify what I need by providing another example.  
I have normalized tables Student / Lessons / Marks (StudentID, LessonID, Mark). I just need to display them as is:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/c/1c473e981403f78cf56f7e614c987a6d864ab5c2.png)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 14, 2023, 8:20am UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/8 "2023-12-14T08:20:59Z")

</div>

Yes… you take the user’s table filter by students (role)  
In that table, relate the user ID to the lessons table user’s IDs and do a lookup for dates… simple

---

<div class="post-metadata">

**Author:** ![Konstantin\_Demishev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/konstantin_demishev/32/66169_2.png) [@Konstantin\_Demishev](https://community.glideapps.com/u/Konstantin_Demishev)\
**Post date:** [December 14, 2023, 9:15am UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/9 "2023-12-14T09:15:37Z")

</div>

Correct. The question is how to display this on Front End (Glide Apps) ?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 14, 2023, 5:08pm UTC](https://community.glideapps.com/t/displaying-rows-a-columns-in-table/68662/10 "2023-12-14T17:08:32Z")

</div>

List component
