BlurredVision
Technical User
I have a field with a delimiter of a comma (Example: DR PEPPER, COKE, 7UP, PEPSI)
My goal is to split up the field split({field_name}, “,”) then do some and if statements against the data
If “COKE” then
“Can remove the rust off of a ford pinto” else
If “PEPSI” then
“Southerners like adding peanuts to Pepsi” else “”
My dilemma is, because the field can contain so many values, I would like to figure out a way to dynamically add the values to a variable..
Meaning, I don’t want to do:
If array[1] = “COKE” then true else
If array[2] = “PEPSI” then false
I would like to do something along the lines of
if array = “COKE” then true else
if array = “PEPSI” then false
I am just attempting to simply things. I would think this could be done with a counter, but I am not 100%
I hope this makes sense
My goal is to split up the field split({field_name}, “,”) then do some and if statements against the data
If “COKE” then
“Can remove the rust off of a ford pinto” else
If “PEPSI” then
“Southerners like adding peanuts to Pepsi” else “”
My dilemma is, because the field can contain so many values, I would like to figure out a way to dynamically add the values to a variable..
Meaning, I don’t want to do:
If array[1] = “COKE” then true else
If array[2] = “PEPSI” then false
I would like to do something along the lines of
if array = “COKE” then true else
if array = “PEPSI” then false
I am just attempting to simply things. I would think this could be done with a counter, but I am not 100%
I hope this makes sense