# Making hard copies of computed columns

**URL:** <https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433>\
**Category:** Ask for Help\
**Created:** [February 2, 2024, 5:23pm UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433 "2024-02-02T17:23:13Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [February 2, 2024, 5:23pm UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/1 "2024-02-02T17:23:13Z")

</div>

I have a table that looks like this;

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

Is there a way for me to write these computed columns to another table that stores by user/date for making a chart/graph? I have several actions I could add a set column/new record to, but I am not sure how to point to a specific record and determine if it exists, and if it exists, how to update it rather than write a whole new record. In my mind, I have a method that should work using relations, but not really sure how to set that up.

---

<div class="post-metadata">

**Author:** ![tuzin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tuzin/32/86077_2.png) [@tuzin](https://community.glideapps.com/u/tuzin)\
**Post date:** [February 2, 2024, 6:07pm UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/2 "2024-02-02T18:07:33Z")

</div>

So do you want to put the data from these multiple rows into one row in another table?

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [February 2, 2024, 8:36pm UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/3 "2024-02-02T20:36:06Z")

</div>

Yes, one row would be best. As far as I know, I can select the proper column in the table for each graph of things I want to show (calories per day, weight per day, etc.)

---

<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:** [February 2, 2024, 11:45pm UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/4 "2024-02-02T23:45:23Z")

</div>

Which specific columns do you want to write to another table? Sum, Last Weight and Last Weight Taken?

What does your data structure look like in the destination table?

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [February 3, 2024, 12:11am UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/5 "2024-02-03T00:11:37Z")

</div>

> [@ThinhDinh](#):
>
> What does your data structure look like in the destination table?

Not really sure how to structure it is the thing. I know i’m going to need some relations but… I basically want the computed column of the total calories and weight for each day. Later I may add a column for the water consumption and et cetera. Start small and go big is what I always say. What do you always say?

---

<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:** [February 3, 2024, 12:12am UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/6 "2024-02-03T00:12:06Z")

</div>

So it’s the “Sum” column?

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [February 3, 2024, 12:26am UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/7 "2024-02-03T00:26:04Z")

</div>

Yes

---

<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:** [February 3, 2024, 12:40am UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/8 "2024-02-03T00:40:20Z")

</div>

What I would do, for future scaling purposes, is to:

- Create a template column in the table where you have the screenshot, something like:

“Key”: Value

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

- In your Users table, create a joined list column that will join the key-value pairs, separated by a comma and a newline character.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/6/b6db728b63a6432cb56e748d9325e497b600cbfa.png)

- Add a template column to convert it to the right JSON format.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/6/a6b08088a064dbfccac861ef44ddb3fa84cd6f21.png)

Now you have something like this.

```auto
{
"Weight": 0,
"Calories": 75,
"Beer/Soda": 70,
"Coffee": 60,
"Activity": 80,
"Water": 90
}

```

And can submit it to a new table as a single cell.

Then, you can use the Query JSON column to query the parts you need.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/d/5da110f302edc841fddbeaf5e72ad129f25c5b50.png)

That way, you don’t need to care about the row orders changing, or much work if you add a new row in the Actions table. Just need a new query JSON column in the destination table to query that new row’s key.

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [February 3, 2024, 5:17am UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/9 "2024-02-03T05:17:02Z")

</div>

I appreciate the sleekness of this. But I don’t know j s. And so if I change anything in the future it’s sure to break. I was kind of hoping for a glide solution. Also, this particular app is a free app and i’m not sure j s is supported?

---

<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:** [February 3, 2024, 6:07am UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/10 "2024-02-03T06:07:19Z")

</div>

What @ThinhDinh offered up doesn’t involve any JavaScript or coding at all. Just a bit of JSON manipulation. Even if there was JavaScript involved, that wouldn’t be a problem because it’s available on all plans.

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [February 3, 2024, 3:52pm UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/11 "2024-02-03T15:52:50Z")

</div>

OK, thank you for the clarification. Obviously, I don’t know much about either. I will give it a whirl.

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [February 3, 2024, 3:54pm UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/12 "2024-02-03T15:54:17Z")

</div>

Thanks again @ThinhDinh. I was/am intimidated by this because I’ve never done it. @Darren_Murphy said it is available on the Free Plan. I will give it a whirl. That’s how you learn, 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:** [February 3, 2024, 3:58pm UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/13 "2024-02-03T15:58:40Z")

</div>

Yes, the Query JSON and JSON Object columns are available on all plans.  
Query JSON uses [JSONata](https://jsonata.org/). If you’re not familiar with JSON, that could be a good place to start. They have a [sandbox](https://try.jsonata.org/) with lots of sample data to play around with, as well as all the documentation.

---

<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:** [February 10, 2024, 3:58pm UTC](https://community.glideapps.com/t/making-hard-copies-of-computed-columns/70433/14 "2024-02-10T15:58:58Z")

</div>

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