im trying to build a nested if/or statement inside of make.com, the code i use currently will be copied below, how can i copy/ format this formula to run correctly inside of make.com value column, any help on this is greatly appreciated!
SAMPLE OF CODE
IF(
OR(
{Postal Code} = “01603”,
{Postal Code} = “01605”,
{Postal Code} = “01606”,
{Postal Code} = “01602”,
{Postal Code} = “01604”,
{Postal Code} = “01570”,
),
“ZONE 1”,
IF(
OR(
{Postal Code} = “1081”,
{Postal Code} = “01010”,
{Postal Code} = “01057”,
{Postal Code} = “01036”,
),
“ZONE 2”,
IF(
OR(
{Postal Code} = “01001”,
{Postal Code} = “01077”,
{Postal Code} = “01034”,
),
“ZONE 3”,
IF(
OR(
{Postal Code} = “01255”,
{Postal Code} = “01244”,
),
“ZONE 4”,
IF(
OR(
{Postal Code} = “01223”,
{Postal Code} = “01235”,
),
“ZONE 5”,
)
)
)
SAMPLE OF CODE
Welcome.
A method of doing this can be using Switch function in Make.
I took the liberty of creating the function for you below. Good luck let me know if this works. Just replace the 233.code with your postal code variable.
{{switch(233.code; 1603; “ZONE 1”; 1605; “ZONE 1”; 1606; “ZONE 1”; 1602; “ZONE 1”; 1604; “ZONE 1”; 1570; “ZONE 1”; 1081; “ZONE 2”; 1010; “ZONE 2”; 1057; “ZONE 2”; 1036; “ZONE 2”; 1001; “ZONE 3”; 1077; “ZONE 3”; 1034; “ZONE 3”; 1255; “ZONE 4”; 1244; “ZONE 4”; 1223; “ZONE 5”; 1235; “ZONE 5”)}}
Best,
Mr.Make
Hello Mr.Make and thank you so much for your help, im not sure i understand what the postal code variable is, i tired this and mapping the column where data is and mapping where i want data to go so far no luck, i will attach screen shots below that may hint to the postal code variable if you could help me locate it i cant thank you enough!


Ahh it looks like the function copy and pasted weirdly. I will add the blue print here. Just copy this set variable into your scenario. @N_lopez
blueprint (24).json (2.6 KB)
This should work also
{{switch({Postal Code};
01603; “ZONE 1”;
01605; “ZONE 1”;
01606; “ZONE 1”;
01602; “ZONE 1”;
01604; “ZONE 1”;
01570; “ZONE 1”;
1081; “ZONE 2”;
01010; “ZONE 2”;
01057; “ZONE 2”;
01036; “ZONE 2”;
01001; “ZONE 3”;
01077; “ZONE 3”;
01034; “ZONE 3”;
01255; “ZONE 4”;
01244; “ZONE 4”;
01223; “ZONE 5”;
01235; “ZONE 5”;
“DEFAULT”
)}}
You put the mapping column in the right position. good job. Let me know if the blueprint helped you.
Just upload it and copy over or use the new function. It should look like this.
for some reason the output is only giving me the zip code and not the zone itself
You set the variable name as the zip code. This is just a name and should not be what you are mapping.
Please just copy this blueprint into you environment and copy the module over into your scenario.
blueprint (25).json (2.6 KB)
Looks like you should also go through the Make Academy and learn more about MAKE. you can do that here
Again your module should look like this @N_lopez make sure to just map you zip code value in the place holder that I have there.
3 Likes
when i copy your blueprint into my existing scenario it gets rid of all the other programed modules around it, so after importing blueprint and rebuilding around it and mapping still returns a blank output, i think the issue lies in the 0s, every zip code starts with a 0 and when copying the code over it gets rid of all the 0s in the variable value field
yeah the issues are in the 0s starting for each zip code, i was able to correct it when deleting the 0 in the zip code and it worked, how would i get around the 0 issue ?
Yes you need to import it into its own scenario then you can just copy it the module into your existing scenario.
did that it code works and is returning the proper zone, now the issues is to fix the leading 0s, because each one starts with 0 in this area lol
Yes sir great. very happy it worked for you 