đŸ‘Ș Make Array — the newest column type!

Make Array is the newest column type in Glide that allows you to combine single values and/or array values to form a new array.

There are a few use cases, but the main ones are:

  1. Combine images from a few different columns to create an image carousel:

  2. Combine multiple arrays together to form a new array:

  3. Append an item to an array to form a new array

Here’s a screencast detailing the process. :popcorn: Enjoy!

19 Likes

nice job!

add this CSS under the image component, and they will scroll by themselves! LOL

<pre><span><style>
.scroller{
width: 100px;
height: 100px;
background: red;
position: relative;
animation: move 30s infinite;
animation-timing-function: ease-out;
animation-direction: alternate;
animation-iteration-count: infinite;
animation-fill-mode: none;
animation-play-state: running;
animation-timing-function: linear;
}
@keyframes move {
from {left: 0px;}
to {left: -7500px;}
}
1 Like

Ha
neat
but not quite what I was expecting regarding UI
CleanShot 2022-03-11 at 22.42.04

1 Like

change to left parameter to 1000px you have only 3 pictures
 you can put that in the template to make a dynamic, depending on the number of images
 from the rollup column
 count

3 Likes

Just missing the part where you can make an array and use it as role in glide tables

3 Likes

Ya
can’t be a thing because “Make Array” is a computed column.

Would love there to be a “Make Array” basic column which just converts a CSV to array (like split text) similar to how we can make an array from Google Sheet column sequencing.

4 Likes

Exactly what I mean :grinning:

2 Likes

I’m not sure about the “why” of this. I think your demo used Glide tables and maybe that is why. I use Google Sheets and if I format my column headers correctly–Item 1, Item 2, Item 3–then Glide automatically creates the array column in the data editor.

Can you suggest some real world applications for which this would be useful?

Might it serve some purpose in the many to one relations of combining fields from an event details sheet (one) with the fields on an events dates sheet (many) on a single details page?

Thanks.

The “Make Array” column removes the need for column grouping like you’re doing in Google Sheets.

The issue is that if you rely on column grouping in Google Sheets and the columns ever get renamed or rearranged, the array breaks and any relations / components relying on that array break as well.

Make Array allows you to pick any column to form the array, regardless of name or arrangement.

The only benefit to Google Sheets column grouping is that it allows you to set Row Owners on the resulting Array column. Hence, Pablo’s comment above.

2 Likes

Just discovered that this may solve a problem that I could never resolve months ago so I forgot about it


The events are allowed to choose three genres. Let’s say an event selects Farmer’s Market, Artists Market, and Live Music. I have three columns in Google Sheets. In the data editor, I see the three columns PLUS a fourth column of the auto-created array. But when I try to add the Event Genre to an event detail page, my field options are genre columns 1, 2, and 3. The array column is not offered as a field to place on the page.

I’m now going to see if I can resolve this using this new array column feature. I’ll let you know how it goes!

2 Likes

Make Array won’t solve that issue
if you want to display all three categories as a string value, use a Join List column from the Make Array column and separate them with something fancy like ‘ ‱ ’

Problem resolved. As usual
you rock!
genre

2 Likes

Looks great!

Sweet, literally. Away with join+split :slightly_smiling_face:

1 Like

Great news! Hope the next step will be to allow use text values in horizontal scrolling cards, just like image carousel. May not be clickable, just for presenting smth like big numbers or so.

Is nobody going to comment about the “We’re all sweet” thing? :wink:

1 Like

Did you hear we’re all sweet in Bob’s video? I remember hearing something like “because I’m sweet”, which Bob definitely is, so Bob is right as usual! :joy:

2 Likes

Another use for the “Make Array” column:

Create a clean delineated string from columns that may or may not contain values:

Keep 'em coming!!! How else are you using this versatile column type?

7 Likes

Would you agree with the following written version:

Turn a comma-separated list of n elements into a comma-separated list of p unique elements

Comma-separated list (n elements)
→ Make array
→ Unique array
→ Join: result is comma-separated list (p unique elements)

(The comma could be anything.)

I wouldn’t use Make Array in this case. I’d go:

  • Split Text
  • Unique
  • Joined List

I think if you pass a Joined List to Make Array, all you’ll get is an array of one item - which contains the entire joined list.

4 Likes