https://www.growthbook.io/ logo
#give-feedback
Title
# give-feedback
b

broad-lamp-82546

01/11/2024, 7:07 PM
Would like to see support for commas in string values, right now if we set a condition to match in a set, and the property string value has a comma, it will split the string into separate tokens (even in advanced mongodb mode)
Specific context for this request is we send deviceModel property as a user trait, and we want to serve different values based on model, however iPhones are defined as iPhoneX,Y e.g. iPhone7,4 and we are unable to match because the comma gets interpretted as separate values in a list
f

future-teacher-7046

01/11/2024, 7:11 PM
There's a workaround for advanced mode right now. Basically have to force the condition to be complex enough so it doesn't try parsing it and just leaves it as-is. If you wrap the condition in an
$and
operator, that should work. For example:
Copy code
{
  "$and": [
    {
      "deviceModel": {
        "$in": [
          "iPhone7,4",
          "iPhone8,0"
        ]
      }
    }
  ]
}
I'll add an issue to our GitHub to fix this so a workaround isn't required
b

broad-lamp-82546

01/11/2024, 7:13 PM
We tried using the advanced mode, but when you hit to save, it converts it back to the simplified token split
Oh, I see missed the part of adding an $and operator
Will try that out
appreciate the prompt response!
f

future-teacher-7046

01/11/2024, 7:23 PM
No problem. I added a GitHub Issue for this bug. Don't know when we'll be able to get to it, but it's on our radar now. Thanks for reporting this! https://github.com/growthbook/growthbook/issues/2027
❤️ 1
5 Views