Comments about the new Array List component

Great new feature! This was always a headache for me

2 Likes

Well if you haven’t add any items to it or assigned a value it will be empty of course :slight_smile:

1 Like

Looks like contains doesn’t work:


image
image

Contains looks for direct values, not properties of objects.

Could you please explain a bit more?
Or give some examples?

Arrays can contain strings list:

{
    "myarray": [
        "San Francisco",
        "Boston",
        "Amsterdam",
        "Paris",
        "Tokyo"    
    ]
}

or objects:

"myarray": [
    {
        "city": "San Francisco"
    },
    {
        "city": "Boston"
    },
    {
        "city": "Amsterdam"
    },
    {
        "city": "Paris"
    },
    {
        "city": "Tokyo"
    }
]

So ["San Francisco","Boston","Amsterdam","Paris","Tokyo"] (first example) contains Paris

But [{"city":"San Francisco"},{"city":"Boston"},{"city":"Amsterdam"},{"city":"Paris"},{"city":"Tokyo"}] does not.

1 Like

There is already a formatter for this. Why create a module? :thinking:

  1. I’m really looking forward to trying this new functionality! As said before, a much needed addition.

  2. As @sid said, all this s/b documented fully. I’d like to add “and ideally, not in the forum”.

  3. A really minor suggestion: to avoid redundancy, call the component only by the word “array” (or list, if you prefer). No need to call it “array list”.

2 Likes

Think of an invoice embedded in an email.

In other words, something that we have been asking for since the birth of Wappler.

2 Likes

Oh no, I am just talking about the array list contains module.
The complete set of modules is actually great and very useful.

Wappler docs website is linked to the commmunity/forum. https://docs.wappler.io/
Any docs created here are automatically available on the docs website as well.

I haven’t tried the new feature yet, but I have no doubt it will be very useful. However, I wouldn’t expect it to make it easier to embed an invoice in an email. Would it be very different to putting line items + some HTML into a variable, using a repeat, and incorporating the variable into the email?

Actually a lot easier and cleaner than using repeats, variables with global names etc.

1 Like

@Sid: found it, thanks.

Very exciting update. Thanks guys!!

Quick question:
Is there a reason for the steps under Data Transformation (Add Columns, Rename Columns, Filter Columns, Join, which too seem to be related to arrays), to be placed in a different folder as the 14 components announced with the 5.3.3 release?

I found that you can access the posting from the DOCS link Wappler Documentation - Working with Server Connect Array Lists

the images do not show properly. See an excerpt here:

This does not happen if I access it from the FORUM using this link:

The same excerpt looks like this;

Fixed.

1 Like

A post was split to a new topic: Array List initial value not set

The screenshots seem to have become ‘unfixed’.