# User based previous date

**URL:** <https://community.glideapps.com/t/user-based-previous-date/34379>\
**Category:** Ask for Help\
**Created:** [November 11, 2021, 6:27am UTC](https://community.glideapps.com/t/user-based-previous-date/34379 "2021-11-11T06:27:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Project](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/project/32/33617_2.png) [@Project](https://community.glideapps.com/u/Project)\
**Post date:** [November 11, 2021, 6:27am UTC](https://community.glideapps.com/t/user-based-previous-date/34379/1 "2021-11-11T06:27:16Z")

</div>

I am making a request app for staffs. In the ‘show details’ i want to add the date of their previous request. What formula can i use in the glide table or on G sheets to get the previous date of that user?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 11, 2021, 6:31am UTC](https://community.glideapps.com/t/user-based-previous-date/34379/2 "2021-11-11T06:31:19Z")

</div>

You can use a rollup column for this.  
Create a multi-relation from your User Profiles table to the “Request” table, joining by email or User ID.  
Then do a rollup through that relation, taking the latest request date.

---

<div class="post-metadata">

**Author:** ![Project](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/project/32/33617_2.png) [@Project](https://community.glideapps.com/u/Project)\
**Post date:** [November 11, 2021, 8:53am UTC](https://community.glideapps.com/t/user-based-previous-date/34379/3 "2021-11-11T08:53:19Z")

</div>

I did’nt quite get it.  
Should i make a multi relation column in user profile or the request table.  
and how do i roll up through that relation.

Can i share support link with you

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 11, 2021, 8:58am UTC](https://community.glideapps.com/t/user-based-previous-date/34379/4 "2021-11-11T08:58:12Z")

</div>

> [@Project](#):
>
> Should i make a multi relation column in user profile or the request table.

In your user profile table.

> [@Project](#):
>
> and how do i roll up through that relation.

> **[Glide Docs](https://www.glideapps.com/docs)**
>
> Welcome to Glide Docs, a steadily growing collection of articles and videos on how to use Glide. We can’t wait to see what you build!

> [@Project](#):
>
> Can i share support link with you

Support links can only be used by Glide Support Staff (I’m not one of them).  
You can share some screenshots of what you have if you like.

---

<div class="post-metadata">

**Author:** ![Project](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/project/32/33617_2.png) [@Project](https://community.glideapps.com/u/Project)\
**Post date:** [November 11, 2021, 9:54am UTC](https://community.glideapps.com/t/user-based-previous-date/34379/5 "2021-11-11T09:54:25Z")

</div>

Thank you. Its working!!

But the problem is that it is showing only the latest date. Not the one from the previous row.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/8/48327e7589e3170684d9d38536040669cf834992.png)  
This is the request table

 ![user table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/9/a93d092df73730153ab042c3ca3096c7fc66ebbb.png)  
This is user table.

I want in the user table to show the previous request date ie. 13th Nov 2021

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 11, 2021, 10:04am UTC](https://community.glideapps.com/t/user-based-previous-date/34379/6 "2021-11-11T10:04:31Z")

</div>

Okay.  
If it’s safe to assume that these will always be entered in chronological order, then instead of using a rollup, you could use a [Single Value](https://docs.glideapps.com/all/reference/data-editor/computed-columns/single-value-column) column, operating through the same relation. In this case, you would take the item that’s one place from the end.

If that assumption isn’t true, then it’s still doable but a little trickier. You’d probably need to use a couple of plugin columns. I’m thinking something like:

- Start with a Lookup column through the relation, which would return an array
- Sort that using the Array → Sort plugin
- Use the Array → Slice plugin to take the 2nd last element.

---

<div class="post-metadata">

**Author:** ![Project](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/project/32/33617_2.png) [@Project](https://community.glideapps.com/u/Project)\
**Post date:** [November 11, 2021, 11:07am UTC](https://community.glideapps.com/t/user-based-previous-date/34379/7 "2021-11-11T11:07:02Z")

</div>

Thank you very much. You are a LEGEND !!

Single value does the work smoothly

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [November 12, 2021, 11:07am UTC](https://community.glideapps.com/t/user-based-previous-date/34379/8 "2021-11-12T11:07:54Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
