Hello,
I have an array of numbers (around 800 numbers) var mylist = [604703,607006,607606,607607,.................]
and I have a Number datatype field in one of my layers. I want to see if the data inside this field match any of the numbers in mylist? and when it does it will say for example " Matched " if does not " No Match".
Thank you.
Solved! Go to Solution.
You can use IndexOf to determine whether an item is found in array
if (IndexOf(myList, feature.$Number) > -1){
return "Matched";
} else {
return "No Match";
}
You can use IndexOf to determine whether an item is found in array
if (IndexOf(myList, feature.$Number) > -1){
return "Matched";
} else {
return "No Match";
}
Thank you so much @ken buja ! it worked !! I was able to use it in the configure popups and in symbology expressions !
Not that this is any better than Ken's answer, just a slightly different code structure:
IIf(IndexOf(myList,feature.$Number) > -1, "Matched", "No Match");
Thank you @Joshua Bixby ! It worked !
Both @ ken Buja and Joshua bixby's code worked with me !!!