https://www.growthbook.io/ logo
#contributing
Title
# contributing
h

helpful-hydrogen-62495

03/22/2022, 10:08 PM
Hey guys, I’m hitting a bug in the UI. I’m adding an attribute to an experiment as a boolean “exists” and then it shows “does not exist” in the UI
f

future-teacher-7046

03/22/2022, 10:08 PM
Taking a look
h

helpful-hydrogen-62495

03/22/2022, 10:09 PM
API response is showing this
is “$exists”: “” the correct mongo syntax for this?
f

future-teacher-7046

03/22/2022, 10:10 PM
yes,
$exists
is correct, but the value should be true or false, not an empty string
h

helpful-hydrogen-62495

03/22/2022, 10:10 PM
ok that may be it then
f

future-teacher-7046

03/22/2022, 10:10 PM
Did you add this condition in the advanced mode?
h

helpful-hydrogen-62495

03/22/2022, 10:11 PM
no the basic mode
I added it as “exists”
While you’re on it, would it also be possible to add an “exists” option to a string type attribute
f

future-teacher-7046

03/22/2022, 10:11 PM
is the
sub_status
attribute an enum data type?
h

helpful-hydrogen-62495

03/22/2022, 10:11 PM
sub status is an enum type yes
f

future-teacher-7046

03/22/2022, 10:12 PM
ok, I'm able to reproduce it. Should be an easy fix
👍 1
h

helpful-hydrogen-62495

03/22/2022, 10:14 PM
lmk when its ready
f

future-teacher-7046

03/22/2022, 10:16 PM
Ok. In advanced mode, you can change it to be
$exists: true
in the meantime.
h

helpful-hydrogen-62495

03/22/2022, 10:17 PM
Can I also apply the exists operator to a string based attribute
f

future-teacher-7046

03/22/2022, 10:18 PM
Yes. Not sure why that's missing from the UI. I'll add those operators as well
🙌 1
h

helpful-hydrogen-62495

03/22/2022, 10:19 PM
sweet appreciate it
f

future-teacher-7046

03/22/2022, 11:57 PM
It should be fixed now
15 Views