I am trying to remove three terms (that represent old values) from a list of Shopify Customer tags, and add the latest value back into the list of customer tags. What I have results in the desired value just being appended to the tags list, without removing any of the old values.
{{remove(13.tags; " Membership Active"; " Membership Cancelled"; " Membership Complete")}} with the “Map” option checked, and adding the latest value separately.
Hi. Are you trying remove a tag using the field to add an tag? The function “remove” is internal for Make to remove values from arrays not a endpoint resource in the APIs.
Don’t hesitate to contact us if you require further assistance.
Hi - this field will accept an array of strings, and it was my understanding was that “remove” returned an array. How can I take an array input, mutate it, and output it again?
@ruarri It seems like your variable “Tags” is not actually an array. The remove() functions works with arrays, so you need to make sure you either transform the tags to an array or something.
Can’t see much with the screenshots you’ve given.
It’s hard to debug it on our end I recommend you start debugging and testing with a “Set Variable” module so you can see what it actually outputs eventually. Most likely something is going wrong somewhere with a data type, or a function.
Once you figured out the output is not what the API is expecting, you can move it over to the Shopify module again.
Thanks @Bjorn.drivn - It’s hard to debug on my end! I am new to Make, so I’m not quite sure what tools are available or handy for debugging. I’ll try what you suggested.
Looks like the issue is because Shopify already have a similar tag which you are trying to map from the second tag field. However the existing tag is slightly different by case or something,