Bold text in popup in MapViewer

2256
6
Jump to solution
03-31-2022 06:22 AM
Labels (1)
acharko
New Contributor III

Is there any way to bold certain elements in an arcade expression? The "source" button is missing from portal for the configure pop-up + add text element, so this would have to be done in Arcade.

I want to bold these field headings: ADDRESS:  and LEGAL UNIT: 

acharko_0-1648732906278.png

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Not until Enterprise 11.0 (hopefully!), I'm afraid. You can see it in AGOL, the way there's a separate Arcade object you can add to popups there, and this allows you to pipe in HTML to specific parts of the expression output.

jcarlson_1-1648734043803.png

 

 

return { 
	type : 'text', 
	text : 'Here is some <b>bold</b> text!'
}

 

jcarlson_0-1648734030179.png

So for now, you'll just have to endure less-than-perfect popups, but know that the solution is coming!

 

- Josh Carlson
Kendall County GIS

View solution in original post

0 Kudos
6 Replies
jcarlson
MVP Esteemed Contributor

Not until Enterprise 11.0 (hopefully!), I'm afraid. You can see it in AGOL, the way there's a separate Arcade object you can add to popups there, and this allows you to pipe in HTML to specific parts of the expression output.

jcarlson_1-1648734043803.png

 

 

return { 
	type : 'text', 
	text : 'Here is some <b>bold</b> text!'
}

 

jcarlson_0-1648734030179.png

So for now, you'll just have to endure less-than-perfect popups, but know that the solution is coming!

 

- Josh Carlson
Kendall County GIS
0 Kudos
acharko
New Contributor III

Thanks for the quick reply! We will watch for it!

0 Kudos
Bud
by
Notable Contributor

I don't have any experience with this sort of thing, and this almost certainly won't work, but I thought I'd ask out of curiosity:

If you put HTML tags directly in the text, what happens? Example: "foo <b>bar</b>"

 

I only ask because I stumbled upon an scenario (in an external system -- IBM Maximo Spatial) where I could put a HTML hyperlink in a db view's field -- and the map (ArcGIS JavaScript API?) picked up the HTML as a proper hyperlink. I would have never guessed that would work. Maybe HTML bolding would have worked too.

Bud_0-1648734302492.png

 

0 Kudos
acharko
New Contributor III

I'm using the new map viewer, not classic and there seems to be some of that functionality missing.
Unfortunately, I can't call out the fields separate from the expression because the expression is looping through and finding where there are multiple owners for properties. If I create an expression for each field, it will repeat the fields instead of grouping them together.

0 Kudos
jcarlson
MVP Esteemed Contributor

jcarlson_0-1648734861354.png

Reads as literal text. There are some WYSIWYG formatting tools in the popup text builder, but you can't get at those inside of an expression.

- Josh Carlson
Kendall County GIS
Amarz
by
Occasional Contributor II

There is a very tedious way to do it where you are using both Managed Expressions and the Text Popup. 

Amarz_0-1686266554184.png

Make your Bolded Field Names through the General Text and add a Managed Expression underneath it.

Edit: If you do go this route.. I'm sorry, but to account for Null data instead of having a blank line, you can simply add the Managed Expression as 

DefaultValue(popupString, 'No Data')
0 Kudos