Searching in a list for a condition

Hello everybody, and happy easter :slight_smile:
I would like to know how to search in a list for a specific condition. Obviously the list is not in the database, but it’s actually the returned list from the Multifileuploader plugin.
Now I have thought to use the each’s item: however for some reason it doesnt work.
The specific example is:
I want to check on the files that i upload on the multifile uploader , the format .jpg. So if I find in the list one filename that contains .jpg , it should change color of the group itself.
If I apply the logic on the first item, it works. I.e Multifileuploader. list.value:first item contains ‘.jpg’ This works.
If i apply the logic on the :each items, it doesnt.

Everytime I only upload one file to see if it works.
Where am I wrong?
Thank you for your help.

Use a condition on the group which need to change the color.

If the multifule upload list of item each item name filters .jpg cont > 0

Change colour

yes if you filter and count , it works. I was trying to understand why it wasnt working with only eachitem’ contains.
But thanks

Always happy to hep, if you stuck do tag me. :wink: dont hesitate

thanks buddy!

This topic was automatically closed after 70 days. New replies are no longer allowed.