Split function always producing array with only one item, ignoring separator

Hello all! I am slightly baffled; I’m trying to split a string into an array of two items, then assign each item to its own variable, and I can’t figure out why it isn’t working.

I’m using the Compose a String function to extract the string “70,12” from the Notes field passed through by Acuity.

I’m then using the Set Variable function to (supposedly!) split the string, naming the variable “values”:

split("70,12";",")

…and am then trying to assign each substring of the “values” array to its own variable, using a Set Multiple Variables function. However, you can see the results that are available to me below:

What I was expecting: for Make to create the array ["70", "12"] when I split the string.

What is happening: Make seems to be creating a single-item array when I split the string, but the ellipsis in the display is making it hard to tell whether the resultant array is ["70"] (dumping the last substring for some reason?!) or ["70,12"] (leaving the string unsplit but converting it into an array anyway). Neither is what I’m looking for!

I feel like I must be misunderstanding something really basic here; what am I doing wrong?

Welcome to the Make community!

What you’re looking at is the variables panel. They only display the first item, and you can ignore the ellipsis since it is used for everything even though the value isn’t truncated…

To be sure, you can always expand the output bundles to see your array:

Screenshot_2024-01-04_220112

If you want to learn more about Make, you can read up in the Help Center. I also recommend doing the tutorials in the Make Academy, and learn advanced skills like how to make custom apps to any API in the Make Partner Training Portal - both have certificates for successful completion.

2 Likes

Hi, thank you so much - I have been automating a bunch of stuff with Make for months and months and somehow never figured out the difference between the variables window and the output bundles view. I feel pretty silly now but am very grateful. I will look into the Make Academy since it looks like I do in fact need more help with the basics than I thought! Thank you again.

2 Likes