Hi
How I can filter an specific field into an array collection?
Example I need to filter all ItemNames in the PlaceOrder event that contains 'COSTA RICA’?


Hi
How I can filter an specific field into an array collection?
Example I need to filter all ItemNames in the PlaceOrder event that contains 'COSTA RICA’?


Best answer by Dov
Hi
Thank you for sharing this with the Community.
The format would be “name of item” in “name of variable you’re looking to target”.
"COSTA RICAN" in event.ItemsThis statement says to show the block if the item name contains “COSTA RICAN”.
Moreover, to break down the format (the why, behind it):
“name of item” = COSTA RICAN
“in” = telling the template where to “look” to find this item name
event.Items = the place where we’re ultimately grabbing the name from to tell us when to populate it or when to hide it
You would need to include the actual full item name so “COSTA RICAN” rather than “COSTA RICA”.
Hope that helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.