Select to view content in your preferred language

Help with inserted text in layout

151
2
Jump to solution
a week ago
Roose_22
New Contributor

I have a map series in which each page is a different numbered grid. I'm attempting to have a text element on each side of layout display the page number for the adjacent grid. I currently have the dynamic text: "See Page: <dyn type="page" property="attribute" field="Page_E"/>" Is there a way to have the text box not display anything if there is no page number in associated field? 

0 Kudos
1 Solution

Accepted Solutions
AubriKinghorn
Esri Regular Contributor

You can use the empty string tag to have a message (or just a blank space) when nothing is in the field. Learn more here: https://pro.arcgis.com/en/pro-app/latest/help/layouts/add-and-modify-dynamic-text.htm#ESRI_SECTION1_.... However it sounds like you want the text surrounding the dynamic text not to display, which the empty string tag won't accommodate. You could use Value dynamic text instead which supports Arcade expressions and write an expression that checks if there is a value, and if there isn't no text is displayed. 

Something like

 

var a = $feature.Perim_ID
var message = "Page number " + a
if (a == " ")
{
message = ""
}
message

 

 

Cheers,
Aubri

View solution in original post

0 Kudos
2 Replies
AubriKinghorn
Esri Regular Contributor

You can use the empty string tag to have a message (or just a blank space) when nothing is in the field. Learn more here: https://pro.arcgis.com/en/pro-app/latest/help/layouts/add-and-modify-dynamic-text.htm#ESRI_SECTION1_.... However it sounds like you want the text surrounding the dynamic text not to display, which the empty string tag won't accommodate. You could use Value dynamic text instead which supports Arcade expressions and write an expression that checks if there is a value, and if there isn't no text is displayed. 

Something like

 

var a = $feature.Perim_ID
var message = "Page number " + a
if (a == " ")
{
message = ""
}
message

 

 

Cheers,
Aubri
0 Kudos
Roose_22
New Contributor

Thank you! 

0 Kudos