I have an attribute expression that is a conditional statement. In my code below, I need to have 'TBD' shown as not linked text. Currently, when this expression shows up in the popup, 'TBD' is linked to my webmap. Any ideas on how to ensure 'TBD' does not show as linked text?
Solved! Go to Solution.
You should look at the if syntax in the documentation. you are missing the curly brackets enclosing the result part.
Since both Types will return the same thing, could also just see if it is included in a list and return what you want:
var link = 'www.myurl.com';
var field= $feature.RESOURCETYPE;
var arr = ["Type 2", "Type 3"];
if (Includes(arr, field)){
return link
} else {
return 'TBD'}
Could also use the Decode function (though, not as easy to add to/modify the list:
Decode($feature.RESOURCETYPE, "Type 2", "www.myurl.com",
"Type 3", "www.myurl.com", "TBD")
R_
You should look at the if syntax in the documentation. you are missing the curly brackets enclosing the result part.
Since both Types will return the same thing, could also just see if it is included in a list and return what you want:
var link = 'www.myurl.com';
var field= $feature.RESOURCETYPE;
var arr = ["Type 2", "Type 3"];
if (Includes(arr, field)){
return link
} else {
return 'TBD'}
Could also use the Decode function (though, not as easy to add to/modify the list:
Decode($feature.RESOURCETYPE, "Type 2", "www.myurl.com",
"Type 3", "www.myurl.com", "TBD")
R_