Add to Array / Remove from Array

Learning Trebuchet method by Roberto and Lucas make myself little bit confused. Because this complicated technique is actually doing very simple thing: Remove Item from List (array) or Add Item to List (array). That definetly should be just a new action: Add/Remove Item. We need it, otherwise it will stay as a possibility only for real experts in Glide.

For comparison, in Adalo you can easily work with arrays by add or remove items.

Brilliant!

Soon I’ll post how I use the method to remove from an array

3 Likes

Just to confirm the idea, what would be a real cenario to add/remove from an array?

Here is a few that I can think of off the top of my head:

  • Add user to a marketing list

  • Category List

  • Favorites List

  • Toppings List

  • Shopping Cart

2 Likes

hey @ilimp, just posted how to do it!

Completely agree, the trebuchet method is really cool but is a pain to learn & implement. Also adds unnecessary bulk.

Add & Remove items in a list/array seems like an obvious solution.

Ive managed it thanks to Rob & Lucas sharing great videos, it just feels super hacky. An action would be better for everyone, particularly beginners!

4 Likes

I have an array that brings the months of the sales per user, but I only want to show the current month (“which is 4”) removing the other months (in this case only the number “3”).

Basically, I want to show the monthly sales per user, not the total sales in the year.

Hola!

To get access to a particular array position (item), you can use a Single Value Column.

Set your array as “From” parameter and select the position via Get->From Start

Saludos!

1 Like