Can I compare multiple values in a collection using Make.com? Yes, you can! This article will show you how to do it easily. Here are some things you will learn:
- How to use the ‘Contains’ function to see if a word is in your data.
- Ways to join lots of data together and then check if the word you’re looking for is there.
- How to use a loop to go through each piece of your data to find what you’re looking for.
Can I Compare Multiple Values in a Collection Using Make.com?
Are you wondering if you can compare multiple values in a collection using Make.com? The answer is yes! Make.com offers several ways to do this, depending on what your data looks like. Let’s explore some simple methods to achieve this.
Understanding the ‘Contains’ Function
One of the easiest ways to check if a collection contains a specific value is by using the ‘Contains’ function. If your data is just a single string, this function can be really handy. For example, imagine you have a field called ‘customFields.10.value’ and you want to see if it includes the word “Foto.” Here’s how you might check:
{{ if(contains(customfields.10.value, "Foto")) "Found" "Not Found" }}
This will tell you “Found” if “Foto” is in there, and “Not Found” if it isn’t.
Joining Values Together
What if your data isn’t just one string but a bunch of them together? No problem! You can join these strings into one and then use the ‘Contains’ function. Suppose you have several values like ‘customFields.10.value.0’, ‘customFields.10.value.1’, and so on. You can combine them into one big string and then search within that string:
{{ if(contains(1.appointment.bookings.0.customFields.10.value.0 + "," + 1.appointment.bookings.0.customFields.10.value.1 + "," + ... + "," + 1.appointment.bookings.0.customFields.10.value.5, "Foto")) "Found" "Not Found" }}
This method will return “Found” if any of those values contain “Foto.”
Looping Through Values
Another great way to check multiple values is by using a loop. This approach lets you go through each value one by one to see if “Foto” is there. Here’s how you might write it:
{{ for(1.appointment.bookings.0.customFields.10.value.0, 1.appointment.bookings.0.customFields.10.value.5 | join(",") | contains("Foto")) "Found" "Not Found" }}
This loop checks each part of your data, telling you “Found” if “Foto” appears in any part of the array.
Remember, the way you choose to check if you can compare multiple values in a collection using Make.com depends on how your data is set up. These methods are straightforward and can be adjusted to fit your needs. Just make sure your data is well-organized and you’re using the ‘Contains’ function correctly to get the results you want!
Conclusion
In conclusion, the article shows that yes, you can compare multiple values in a collection using Make.com by using different methods like the ‘Contains’ function, joining values, or looping through them. Each method helps you find what you’re looking for in your data, whether that’s a single word or more. This makes working with collections in Make.com easier and more efficient, allowing you to customize your searches to match specific needs.