# Getting values from an Array

**URL:** <https://community.glideapps.com/t/getting-values-from-an-array/65994>\
**Category:** Ask for Help\
**Created:** [September 11, 2023, 12:04pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994 "2023-09-11T12:04:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Ruiz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_ruiz/32/62992_2.png) [@Daniel\_Ruiz](https://community.glideapps.com/u/Daniel_Ruiz)\
**Post date:** [September 11, 2023, 12:04pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/1 "2023-09-11T12:04:46Z")

</div>

Hello!

I’m relatively new to using Glide and I’m exploring “Array Columns”.

Let me give you some context. I have different projects to which I can assign products. To know how many products I have in each project I have created a multiple relation. I need to get all the products I have brought but independently. Is there any way to do this? (I know you can use a split function, but i want to get all the values, not only one of them. In addition, the number of products may vary depending on how many are added.)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/6/76f1cd540c43b993ab0bb11d7e05c70d76e0da67.jpeg)

I may be having a misconception, I would appreciate any help.

---

<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:** [September 11, 2023, 12:07pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/2 "2023-09-11T12:07:50Z")

</div>

You’ll need to parse the array into their own rows using a helper table:

> [@fishbaguette\_breadbasket Transpose Columns to an Inline List: The Miracle Method](https://community.glideapps.com/t/transpose-columns-to-an-inline-list-the-miracle-method/32766):
>
> I’m often asked how to take columns of data (say form responses) and display them in an inline list. Here’s one way to do it—the MIRACLE METHOD. [[Glide: Transpose Data Columns into an Inline List with the MIRACLE METHOD] ](https://www.youtube.com/watch?v=t-sh_Q3WbQc)

I also showcase the method here (somewhere around 13:30)

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/a/ea5efb694429220400288978917de8bf1457c961.jpeg "Glide 101: EVERYTHING You Need to Know About Call API and Query JSON") ](https://www.youtube.com/watch?v=7F4e9JatqeM&t=799s)

---

<div class="post-metadata">

**Author:** ![Daniel\_Ruiz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_ruiz/32/62992_2.png) [@Daniel\_Ruiz](https://community.glideapps.com/u/Daniel_Ruiz)\
**Post date:** [September 11, 2023, 12:13pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/3 "2023-09-11T12:13:45Z")

</div>

I’ll take a look, thanks!

---

<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:** [September 11, 2023, 12:15pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/4 "2023-09-11T12:15:57Z")

</div>

My pleasure. If you get stuck, feel free to DM me.

---

<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:** [September 11, 2023, 1:13pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/5 "2023-09-11T13:13:37Z")

</div>

What are you trying to do with the related products? Products are already in rows, and you already have a multiple relation. If you are just trying to display the related products when viewing a project, then all you need to do is add a collection to the project detail screen and set the source to the relation.

---

<div class="post-metadata">

**Author:** ![serg\_sws](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/serg_sws/32/63017_2.png) [@serg\_sws](https://community.glideapps.com/u/serg_sws)\
**Post date:** [September 11, 2023, 1:20pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/6 "2023-09-11T13:20:16Z")

</div>

If you want to get all items from another table, do a Lookup by table (not by relation).  
If you just need the sum price of all items, do a Rollup by table.  
Or calculate the sum do Rollup by “Lookup all from table”.

> **See Images**
>
> ![Project](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/d/3d020154d38521901244f84937bab96542ca2937.jpeg)  
> ![Sum From Table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/f/8fa42f63c397c6468be861bda4d695df6c0dde56.jpeg)  
> ![Lookup All From Table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/b/4b4e927f305e52e044733c81aeffc6d52a6bed0e.png)  
> ![Sum From Lookup](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/1/715228321134b4744271960aaa9ad722bc09eb9a.jpeg)

---

<div class="post-metadata">

**Author:** ![Daniel\_Ruiz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_ruiz/32/62992_2.png) [@Daniel\_Ruiz](https://community.glideapps.com/u/Daniel_Ruiz)\
**Post date:** [September 11, 2023, 1:26pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/7 "2023-09-11T13:26:32Z")

</div>

Hi!

The purpose of all this is to create at the end a PDF with the obtained data, my problem comes when I need to map the data to a PDF file (I have another “products” table where I can know which products are assigned to the currently selected project).

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/7/974be93c2a745a174d01534c92c13e7ec024eabe.jpeg)  
But when I need to map the data I only get the value of the first row, and I am trying to solve it somehow.

Thanks for your time!

---

<div class="post-metadata">

**Author:** ![Daniel\_Ruiz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_ruiz/32/62992_2.png) [@Daniel\_Ruiz](https://community.glideapps.com/u/Daniel_Ruiz)\
**Post date:** [September 11, 2023, 1:28pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/8 "2023-09-11T13:28:29Z")

</div>

Thanks for the information, that’s not exactly my problem but I appreciate your dedication and time.

Regards!

---

<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:** [September 11, 2023, 1:55pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/9 "2023-09-11T13:55:56Z")

</div>

I guess it all depends on how data needs to be formatted to pass to the PDF. You could create a template column or JSON object that joins all of the pertinent information in each product row into a a single column. Then use a something like a Joined List column in the project table to retrieve the related product info as a delimited text string.

---

<div class="post-metadata">

**Author:** ![serg\_sws](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/serg_sws/32/63017_2.png) [@serg\_sws](https://community.glideapps.com/u/serg_sws)\
**Post date:** [September 11, 2023, 6:52pm UTC](https://community.glideapps.com/t/getting-values-from-an-array/65994/10 "2023-09-11T18:52:27Z")

</div>

That’s probably what you need.  
If you need something else, make and post a sample PDF of what you want to get as a result.

> **See Images**
>
> ![Table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/d/4d3add111355c3477375092520a6c37a01f7b9ca.png)  
> ![Joined List](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/c/4c99fd7520eff3258f0d01de3c785b322d3fd456.png)  
> ![Result](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/8/a804048f240bbe14d419d447f37b51332f7af87b.png)
