Use hex codes in if/else statement using Arcade

Jump to solution
06-10-2021 11:13 AM
Labels (1)
New Contributor

I have a custom pop-up where I'm using HTML and Arcade expressions to communicate whether or not a Library was included in an event. I have a large table built in the pop-up using HTML (see "HTML.txt") and inside that table, I have Arcade expressions using if/else statements to return an "X" if the result is true (or the Library was involved). I'm using a "1" in the attribute table indicating that a Library was involved and a "0" if they were not involved.

Here is an example of one arcade expression (titled: {expression/expr0}) which I then bring into the table HTML code (I have one arcade expression for each Library - probably not efficient, but I'm new to arcade!):

var X = $feature["Augsburg_Park"];
IIf (X == 1, 'X', '');

This results in a pop-up that looks like this:


Here is where I need help!

If a Library has an "X" in the table next to it (meaning it was included in an event), I would like to have the text (Library name and the "X") bolded and change colors (#00AEEF).

How do I integrate hex codes and font changes into an arcade expression?

0 Kudos
1 Solution

Accepted Solutions
2 Replies
Esri Regular Contributor
Occasional Contributor

Can this be achieved in ArcPro?

0 Kudos