0

I am formatting a pop up and have one attribute where some of the features have a value and the others are empty. I want to make it so when I click on a feature that has a notes value, it shows up in the pop up but when I click on a feature that does not have a notes value, nothing shows up. Below is what I have come up with, but it still does not work.

IIF($feature.NOTES != null, ret + " Notes: " + Proper($feature.NOTES), ret);

where ret is a variable that includes some generic formatting strings. As of now, when I click on a feature that has a note, the pop up works and reads "Notes: xyz.". But when I click on a feature that does not have a note, the pop up will still read "Notes: ".

1 Answer 1

1

After some time, I was able to resolve the issue so I am posting this as an answer. I first had to create two new variables, one for the note attribute value and one for the string that I wanted to be included if there is a note. The code looked like this:

var note = $feature.NOTES
var n = (" Notes: " + Proper($feature.NOTES))
IIF(note == " ", ret, ret + n)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.