Create a check or X symbol in attribute expressions for a pop up

1112
2
Jump to solution
04-01-2021 11:05 AM
Labels (3)
jaykapalczynski
Frequent Contributor

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)

0 Kudos
1 Solution

Accepted Solutions
jaykapalczynski
Frequent Contributor

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)

View solution in original post

0 Kudos
2 Replies
jaykapalczynski
Frequent Contributor

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.....

 

jaykapalczynski_0-1617306590683.png

 

And this would be the result....I just Cannot find the example I was using...PLEASE HELP

 

jaykapalczynski_0-1617308977315.png

 

0 Kudos
jaykapalczynski
Frequent Contributor

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)

0 Kudos