Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Analytics Champion Program are open!
SOLVED

How to escape values containing commas within comma-delimited s.list vars

Avatar

Level 2

We use commas as our delimiter in s.list vars. However I now have a situation where values being passed could potentially include commas in them.

How do I make sure that any commas appearing within values do not cause delimiting of the s.list value? Is it as simple as putting single or double quotes around values?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Or you may go the the report suite admin and change the "value delimiter" from a comma to another character which you are certain will not be part of the data.

View solution in original post

6 Replies

Avatar

Community Advisor

I've not tried to escape characters before... I would have to try escaping to see if it works, but another option might be to replace commas that are part of the values with something else, or remove them? 

 

Possible processing each piece of data with a regex replace?

Avatar

Level 2

Thanks Jennifer, good idea. This is probably what I'll end up doing if quotes don't work

Avatar

Community Advisor

I assume you have a dev / qa / testing suite of some sort. You can try some of the options there and see if anything works. The data should show up in about an hour... just keep track of what you tried and when.

Avatar

Correct answer by
Community Advisor

Or you may go the the report suite admin and change the "value delimiter" from a comma to another character which you are certain will not be part of the data.

Avatar

Level 2

Thanks yes, I am thinking about that. The problem is we use the s.list vars for multiple things, basically anything we need to be able to collect multiple values in a single call for (I've configured each of the s.list vars for the three visit scopes). This means I need to go back through the code to find every instance of where we set s.list, and change any joins to use the correct delimiter.

 

I might still do this if I can't find another solution. 

Avatar

Community Advisor

Yes, this is a common issue... torn between changing the entire implementation or not...