# Change Style dynamically

**URL:** <https://community.glideapps.com/t/change-style-dynamically/5267>\
**Category:** Feature Requests\
**Created:** [March 8, 2020, 1:34am UTC](https://community.glideapps.com/t/change-style-dynamically/5267 "2020-03-08T01:34:41Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ralf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ralf/32/492_2.png) [@Ralf](https://community.glideapps.com/u/Ralf)\
**Post date:** [March 8, 2020, 1:34am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/1 "2020-03-08T01:34:41Z")

</div>

Is it possible to dynamically change style from details to list when more than one item?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 8, 2020, 1:41am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/2 "2020-03-08T01:41:19Z")

</div>

I would say probably not. Might be a good feature request with an option to turn it on or off. The List Relation component works like this. One item in the List Relation will take you directly to details. More than one item in the List Relation will take you to the list.

---

<div class="post-metadata">

**Author:** ![Ralf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ralf/32/492_2.png) [@Ralf](https://community.glideapps.com/u/Ralf)\
**Post date:** [March 8, 2020, 2:31am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/3 "2020-03-08T02:31:24Z")

</div>

Thanks @Jeff_Hager! The List Relation component does not help. This is the case: User profile filtered on signed-in user. Occassionally a couple share the same email address. Would like to avoid the extra step with List style for all single users.

---

<div class="post-metadata">

**Author:** ![Ralf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ralf/32/492_2.png) [@Ralf](https://community.glideapps.com/u/Ralf)\
**Post date:** [March 16, 2020, 4:04pm UTC](https://community.glideapps.com/t/change-style-dynamically/5267/4 "2020-03-16T16:04:26Z")

</div>

@Mark is this something you would put on the todo list?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 16, 2020, 5:51pm UTC](https://community.glideapps.com/t/change-style-dynamically/5267/5 "2020-03-16T17:51:27Z")

</div>

I suppose if you really needed something now, you could create a relation column in the sheet linking back to itself using email. Then create a Rollup column to count the number of records in the relation with that email. Display the tab with the Detail style layout. Set Visibility on all components to only show if the Rollup count equals 1. Finally add an inline list using the relation and set visibility if the Rollup count is greater than 1.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 17, 2020, 11:17am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/6 "2020-03-17T11:17:29Z")

</div>

Exactly what I was going to suggest!

---

<div class="post-metadata">

**Author:** ![Ralf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ralf/32/492_2.png) [@Ralf](https://community.glideapps.com/u/Ralf)\
**Post date:** [March 18, 2020, 11:46pm UTC](https://community.glideapps.com/t/change-style-dynamically/5267/7 "2020-03-18T23:46:48Z")

</div>

Relation column in sheet or app data? Do not fully understand, grateful a step by step instruction!

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 19, 2020, 2:22am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/8 "2020-03-19T02:22:45Z")

</div>

I’m talking about a relation column set up in the data tab.

- Create the Relation column to link the email column to the same email column in the same sheet.
- Create a Rollup column that uses the relation to build a count of related records.
- Create a tab that displays this sheet in the Detail style layout and filter the tab by signed in user.
- Add components to show drugs for a single user.
- Set the visibility on all of these components to only display of the Rollup column count is equal to 1.
- Add an inline list component that uses the Relation column for it’s data source.
- Set the visibility on the inline list to only show if the Rollup column count is 2 or greater.

---

<div class="post-metadata">

**Author:** ![Ralf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ralf/32/492_2.png) [@Ralf](https://community.glideapps.com/u/Ralf)\
**Post date:** [March 19, 2020, 7:35am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/9 "2020-03-19T07:35:28Z")

</div>

Thank you, but Count in Rollup column returns the total of the Relation column?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 20, 2020, 12:23pm UTC](https://community.glideapps.com/t/change-style-dynamically/5267/10 "2020-03-20T12:23:15Z")

</div>

It should return the count of the related rows as long as you point it to the relation.

---

<div class="post-metadata">

**Author:** ![Ralf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ralf/32/492_2.png) [@Ralf](https://community.glideapps.com/u/Ralf)\
**Post date:** [March 21, 2020, 1:20am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/11 "2020-03-21T01:20:02Z")

</div>

Count in Rollup column does not return 1 or 2. Se example:

 ![Glide · Create Apps from Google Sheets 2020-03-21 02-16-01.png](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/e130469f2b0bec912b01c28bd186902e7b2af5fd.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 21, 2020, 3:17am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/12 "2020-03-21T03:17:00Z")

</div>

Two things…it looks like your relation may not be set to Multiple, and can you post a screenshot of the Rollup settings? Based purely on your screenshot, I expect to see 1, 1, 2, 2 in the Rollup column.

---

<div class="post-metadata">

**Author:** ![Ralf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ralf/32/492_2.png) [@Ralf](https://community.glideapps.com/u/Ralf)\
**Post date:** [March 21, 2020, 6:51am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/13 "2020-03-21T06:51:48Z")

</div>

Thank you @Jeff_Hager, Relation was not set to Multiple!

 ![Glide · Create Apps from Google Sheets 2020-03-21 07-46-32](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/eb0957a1207c3b6ea596fcd46bbcb742cf43c035.png)

---

<div class="post-metadata">

**Author:** ![Ralf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ralf/32/492_2.png) [@Ralf](https://community.glideapps.com/u/Ralf)\
**Post date:** [March 21, 2020, 8:43am UTC](https://community.glideapps.com/t/change-style-dynamically/5267/14 "2020-03-21T08:43:28Z")

</div>

> [@Ralf](#):
>
> @Jeff_Hager

Have now completed the solotion, works better than expected, Feature Request not needed!

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 21, 2020, 2:22pm UTC](https://community.glideapps.com/t/change-style-dynamically/5267/15 "2020-03-21T14:22:59Z")

</div>

Glad you got it to work. Genuinely curious though, what did you have in your Rollup column settings to show 3, 2, 1, 0?

---

<div class="post-metadata">

**Author:** ![Ralf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ralf/32/492_2.png) [@Ralf](https://community.glideapps.com/u/Ralf)\
**Post date:** [March 21, 2020, 2:59pm UTC](https://community.glideapps.com/t/change-style-dynamically/5267/16 "2020-03-21T14:59:00Z")

</div>

Frankly speaking I don’t know, unable recreate it!

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 21, 2020, 3:17pm UTC](https://community.glideapps.com/t/change-style-dynamically/5267/17 "2020-03-21T15:17:28Z")

</div>

hehe, ok. No problem.
