I am trying to build an expression that will show a RED X if the value is No and a GREEN check if yes...
I have done this before but cant remember....
HOW can I return a symbol instead of text as seen below.
function symbol(feature){
var display = When(feature == 1, 'Yes', feature == 0, 'No', 'n/a');
return display
}
symbol($feature.SOMEFIELD)
Solved! Go to Solution.
I figured it out....you can go to one of these sites (sure there are more)
You can click and save the emoji icons and simply paste them in the Attribute Expression Builder window where you write your expression code.
// https://fsymbols.com/
// https://fsymbols.com/signs/tick/
// https://emojipedia.org/question-mark/
function symbol(feature){
/* Yes or 0 value returns a Check Mark, No or 1 Returns an X */
var display = When(feature == "Yes", "✔️", feature == "No", "❌", " :question_mark:");
return display
}
symbol($feature.someattribute)
I saw this but do not know how to make the check or the X in the actual expression builder
Sadly I just took a screen shot and did not save it.....
And this would be the result....I just Cannot find the example I was using...PLEASE HELP
I figured it out....you can go to one of these sites (sure there are more)
You can click and save the emoji icons and simply paste them in the Attribute Expression Builder window where you write your expression code.
// https://fsymbols.com/
// https://fsymbols.com/signs/tick/
// https://emojipedia.org/question-mark/
function symbol(feature){
/* Yes or 0 value returns a Check Mark, No or 1 Returns an X */
var display = When(feature == "Yes", "✔️", feature == "No", "❌", " :question_mark:");
return display
}
symbol($feature.someattribute)