# Edit - Update Previous Column

**URL:** <https://community.glideapps.com/t/edit-update-previous-column/23927>\
**Category:** Ask for Help\
**Created:** [March 8, 2021, 2:33am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927 "2021-03-08T02:33:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 8, 2021, 2:33am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/1 "2021-03-08T02:33:02Z")

</div>

Hi all,  
Here I am again.

Can I know is there any ways to update the column that the user will edit. and the new column.  
Eg: Every quotation got “Status”. Might be Open, Won, Lost, Superseded and others.  
Let say, current quotation the user want to edit is number GE-2103-1001-Rev.0 and the status open.  
And after edit. How we want the previous quotation status will be “Superseded”

---

<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:** [March 8, 2021, 6:22am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/2 "2021-03-08T06:22:40Z")

</div>

hmm, that’s tricky, but I think it’s doable… what follows is just me thinking out aloud, I haven’t actually tested the approach 😉

- To start with, I would separate your order number and revision number into two separate columns. So one column would have `GE-2103-1001-Rev.`, and the other would have `0`
- Next, create a multi-relation that joins the order number to itself. This gives you a list of all rows with that order number.
- From that multi-relation, create a rollup column that selects the maximum revision number
- Then finally, use an if-then-else column to determine the order status: if revision number equals max revision number then `Open`, otherwise `Superseded`

As I said, I haven’t actually tested this, and it doesn’t cater for your other statuses (Won, Lost, etc), but could probably be extended to do so. You’d need to experiment with it a bit.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 8, 2021, 6:45am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/3 "2021-03-08T06:45:26Z")

</div>

But from your item 3 , " \*\* From that multi-relation, create a rollup column that selects the maximum revision number"\*\*  
It would display the max from all the column. But it need to be display max from different quotation number right.

---

<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:** [March 8, 2021, 6:55am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/4 "2021-03-08T06:55:19Z")

</div>

No, that’s the point of the relation.  
Each row will have a number, but that number should correspond to the maximum version number of all rows that match the order number in that row.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 8, 2021, 7:01am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/5 "2021-03-08T07:01:37Z")

</div>

It looks like this right ?  
GE-2102-1034-Rev.1 should Open

Quotation No | Revision No. | Max Value | Status(if the else)  
GE-2102-1033-Rev. | 0 | 2 | Superseded  
GE-2102-1033-Rev. | 1 | 2 | Superseded  
GE-2102-1033-Rev. | 2 | 2 | Open  
GE-2102-1034-Rev. | 0 | 2 | Superseded  
GE-2102-1034-Rev. | 1 | 2 | _ **Superseded** _

---

<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:** [March 8, 2021, 7:36am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/6 "2021-03-08T07:36:33Z")

</div>

ah, yes I see the problem. There will be a way to overcome that. I don’t have time right now, but will think on it and come back to you a bit later with a solution (if somebody else doesn’t jump in in the meantime).

---

<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:** [March 8, 2021, 12:49pm UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/7 "2021-03-08T12:49:03Z")

</div>

Okay, as promised here is a solution. You will need 2 additional columns:

- A template column that joins the quotation column to the revision column
- A second template column that joins the quotation column to the maximum revision number (ie. the rollup column)

Then change the if-then-else column so that it compares the two templates.  
If they match - status is open  
If they don’t match - status is superseded.

![Screen Shot 2021-03-08 at 8.48.22 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/3/b36e16e2de1c52293bc024d24a0da70edb3adf20.png)

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 9, 2021, 12:52am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/8 "2021-03-09T00:52:09Z")

</div>

Hi Darren,  
Seems good.  
But can i know the configuration of “rel-self”?

---

<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:** [March 9, 2021, 12:55am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/9 "2021-03-09T00:55:33Z")

</div>

Here…

> [@Darren\_Murphy](#):
>
> Next, create a multi-relation that joins the order number to itself. This gives you a list of all rows with that order number.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 9, 2021, 1:04am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/10 "2021-03-09T01:04:38Z")

</div>

Am i doing right?  
Why mine not come out the result just like you ☹

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/1/316cf01ffcf01f9a78bda061e9fe5757a23adb43.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/f/4fdc0593f02b18e8b5556108c20b4c0ad8fee041.jpeg)

---

<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:** [March 9, 2021, 1:27am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/11 "2021-03-09T01:27:58Z")

</div>

It needs to be a multi-relation (tick the “Match multiple” box)

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 9, 2021, 2:02am UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/12 "2021-03-09T02:02:51Z")

</div>

Thank you so much Darren.  
Very smart and brilliant though !

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:53pm UTC](https://community.glideapps.com/t/edit-update-previous-column/23927/13 "2024-01-17T16:53:07Z")

</div>

Closed on January 17, 2024, 4:53pm UTC


