Switch with substring and leading zero match (not working in module)

I need to parse the packageNumber and depending on the first 3 chars I need to match it to a carrier number

image

{{switch(substring(6.packageNumber; 0; 3); “‘062’”; 100556; “JJD”; 7041; 102; 1161; 311; 100005)}}

the problem is that DPD (AT) uses 062 with a leading zero

sending me via slack just {{substring(6.packageNumber; 0; 3)}} I do get 062

But when I want to save the module the leading zero always gets removed by MAKE:

  1. I Enter 062 with leading zero
    image
  2. I click OK
  3. I reopen the HTTP Request module and it got changed to this
    image

I tried single quotes (as in the above sample) and double quotes but this does not work

Hey @leotulipan
Welcome to the Make Community.

You can use Set Variable to do this
If you want more than one then use Set Multiple Variables


Thanks,
Sachin Shrivastava

2 Likes