# How to count sessions per coach without new rows or hardcoded workflows?

**URL:** <https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606>\
**Category:** Ask for Help\
**Created:** [August 1, 2025, 12:10pm UTC](https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606 "2025-08-01T12:10:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Colorasis\_Inc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/colorasis_inc/32/85554_2.png) [@Colorasis\_Inc](https://community.glideapps.com/u/Colorasis_Inc)\
**Post date:** [August 1, 2025, 12:10pm UTC](https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606/1 "2025-08-01T12:10:09Z")

</div>

I’m building a gym app in Glide.

I already have **3 main tables** :

- `Users` table — stores **all users** , including **members and coaches** , with their **roles** defined

- `Memberships` table — defines the types of memberships (e.g. “10 Sessions”, “1 Month”)

- `Member Memberships` table — each row represents a **specific membership** purchased by a **member**

During the time of a membership, members train with **different coaches** , depending on availability.

* * *

**🎯 Goal:**  
I want to **track how many sessions each coach has done** with a specific member for each membership.

But I want to:

- ❌ Avoid creating a new row for every session (to save Glide row usage)

- ❌ Avoid using dropdowns to pick the coach

- ❌ Avoid manually updating workflows when a new coach is added

* * *

**🧠 The idea:**  
Each time a **coach presses the “Session Done” button** , I want Glide to:

- **Automatically detect which coach pressed it** (based on the signed-in user)

- **Increment a session counter** tied to that coach in that specific membership row

Example desired structure:

| Member | Membership | Coach James Sessions | Coach Andrew Sessions |
| --- | --- | --- | --- |
| Jane | 10 Pack | 3 | 5 |

* * *

**❓My question:**  
How can I dynamically track which coach pressed the button and increment their session count **without hardcoding a separate IF/ELSE for each coach**?

Is there a scalable way to do this **within one row per membership** , based on my existing table structure?

---

<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:** [August 1, 2025, 12:30pm UTC](https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606/2 "2025-08-01T12:30:46Z")

</div>

Just like I we discussed in your other thread, you can use the Set Column action to write the current date time as a special value. Likewise you also have access to the signed in user email as a special value, as well as any column from the user profile.

---

<div class="post-metadata">

**Author:** ![Colorasis\_Inc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/colorasis_inc/32/85554_2.png) [@Colorasis\_Inc](https://community.glideapps.com/u/Colorasis_Inc)\
**Post date:** [August 1, 2025, 1:04pm UTC](https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606/3 "2025-08-01T13:04:35Z")

</div>

Thanks again for your support! I don’t store each training session as a separate row. Instead, I store each **membership** purchased by a member as a single row in the `Member Memberships` table. That row holds details like start date, end date, session limits, etc.

What I want to do is:

- Have a **column that stores the coach’s name** every time a coach presses a **“Training Done”** button.

- This way, the column will hold **multiple coach names** (e.g. “Ali,Ali,Veli,Veli,Ali”).

- Then I want to **calculate how many sessions each coach did** for that membership based on the stored names.

Is there a way in Glide to:

- Append names to a single column on each button press, and

- Later **count how many times each coach’s name appears** in that column?

---

<div class="post-metadata">

**Author:** ![Colorasis\_Inc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/colorasis_inc/32/85554_2.png) [@Colorasis\_Inc](https://community.glideapps.com/u/Colorasis_Inc)\
**Post date:** [August 1, 2025, 1:14pm UTC](https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606/4 "2025-08-01T13:14:20Z")

</div>

my problem is that set column value action just sets a specific value to that column. i need to add an other value to that column and have another column to count how many times each coach’s name is mentioned in the other column where we store them

---

<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:** [August 1, 2025, 1:33pm UTC](https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606/5 "2025-08-01T13:33:11Z")

</div>

What you could do is create a template column that takes the stores names, and adds a comma followed by the name from the user profile. For example, you can set up your template column like this and set up replacements for ‘Stored’ and ‘New’

`Stored,New`

Then change your Set Column action take the template value and write it to the Stored column. This will append the signed in user’s name each time the button is clicked.

As for the count, I guess it depends on how you want to present the results, but I’d maybe ask ChatGPT for javascript that takes the Stored value as input and returns a markdown table that you can display in a rich text component.

---

<div class="post-metadata">

**Author:** ![Colorasis\_Inc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/colorasis_inc/32/85554_2.png) [@Colorasis\_Inc](https://community.glideapps.com/u/Colorasis_Inc)\
**Post date:** [August 2, 2025, 6:22pm UTC](https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606/6 "2025-08-02T18:22:49Z")

</div>

sorry for late response, i have been trying my best to get this done for hours since yesterday and i finally figured out what u said. Templates confused me a lot until i understood what exactly was needed to be done. Thank you for your effort

 ![Screenshot 2025-08-02 at 21.21.11](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/7/57eaf6ab3fb0562ae9bda1ecef5fe4d40fdfb78a.jpeg)

---

<div class="post-metadata">

**Author:** ![Colorasis\_Inc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/colorasis_inc/32/85554_2.png) [@Colorasis\_Inc](https://community.glideapps.com/u/Colorasis_Inc)\
**Post date:** [August 2, 2025, 9:52pm UTC](https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606/7 "2025-08-02T21:52:24Z")

</div>

![Screenshot 2025-08-03 at 00.49.13](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/5/c5515dd2d5f220d5c393a88c0c889740a58cf227.jpeg)

btw one more question. this is my workflow that is triggered by the button that is supposed to increment value, write date and save the name of coach who pressed that button. lets suppose that coach accidentally pressed the button and wants to undo it. Is it possible to configure the second button in a **Button Block** component to “undo” the workflow that was just triggered?

---

<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:** [August 3, 2025, 12:11am UTC](https://community.glideapps.com/t/how-to-count-sessions-per-coach-without-new-rows-or-hardcoded-workflows/83606/8 "2025-08-03T00:11:45Z")

</div>

Undo is a bit more complex backend-wise.

You would have to split the relevant columns into an array, then remove the last element and join them back again I suppose.

I guess each of the relevant columns would need a JavaScript column so you can pre-calculate the “last value”. Then when users click an “Undo” button, it would set those JavaScript results into the original columns.

An alternative is to write the current columns’ values into some basic columns before attempting to change them with an update, so you have values ready-made to undo if needed.
