ArcGIS Pro Layout: Dynamic Text display only date

1121
4
Jump to solution
10-12-2023 10:52 AM
JonathanDandois
Occasional Contributor

Building a Map Series in Pro and trying to display a survey date field for the feature on each series page. this points to a datetime field, but I only want to show the date. Per the docs, https://pro.arcgis.com/en/pro-app/latest/help/layouts/date-and-time-dynamic-text.htm, I should be able to just use format="short" to display only date, but this does not seem to work. Pro 3.1.3

Note that because this is a Map Series, this is inserted into the Layout using Insert > Dynamic Text > Map Series > Attribute.   Could the type="page" tag be conflicting with the format="short" tag? It doesn't seem like any formats are accepted.  Changing to property="date" has no impact.

Thoughts?

JonathanDandois_1-1697132993176.png

 

 

0 Kudos
1 Solution

Accepted Solutions
AubriKinghorn
Esri Regular Contributor

Hi!

You're right, because you are using the attribute to get the date it works a little differently. The date formatting tags only apply to date-specific dynamic text elements like Date Exported or Current Time. 

For attributes, the date format is read from the table itself. So you can edit the date format in the fields view and that will be reflected in your layout. The attribute dynamic text just displays what's in the table, it stays in sync with how the table is formatted.

If you don't want to change the formatting for the attribute table you can use Value dynamic text instead. Value dynamic text also reads values from an attribute table, but it can be used without a map series and applied to stand-alone tables. Value dynamic text supports Arcade expressions so you can write an arcade expression to display your date data differently on the page than it is shown in the table.

AubriKinghorn_0-1697134513729.png

 

Cheers,
Aubri

View solution in original post

4 Replies
AubriKinghorn
Esri Regular Contributor

Hi!

You're right, because you are using the attribute to get the date it works a little differently. The date formatting tags only apply to date-specific dynamic text elements like Date Exported or Current Time. 

For attributes, the date format is read from the table itself. So you can edit the date format in the fields view and that will be reflected in your layout. The attribute dynamic text just displays what's in the table, it stays in sync with how the table is formatted.

If you don't want to change the formatting for the attribute table you can use Value dynamic text instead. Value dynamic text also reads values from an attribute table, but it can be used without a map series and applied to stand-alone tables. Value dynamic text supports Arcade expressions so you can write an arcade expression to display your date data differently on the page than it is shown in the table.

AubriKinghorn_0-1697134513729.png

 

Cheers,
Aubri
JonathanDandois
Occasional Contributor

@AubriKinghorn thank you, the last option with the "Insert > Dynamic Text > Table Attribute > Value" Dynamic Text worked as described. I generally modify the format of the table.   I do see now on the Spatial Map Series Dynamic text page that it discusses this Table Attribute Dynamic Text. an interesting feature  and one I will have to keep in mind. https://pro.arcgis.com/en/pro-app/latest/help/layouts/use-dynamic-text-with-map-series.htm#ESRI_SECT...

Thanks!

 

 

JonathanDandois_0-1697138551110.png

 

 

0 Kudos
MatthewAllen
New Contributor III

Insert the dynamic date, the edit the dynamic element.  (Date Printed: <dyn type="layout" name="Letter Portrait" property="datePrinted" format="short|short"/>)

I made the map series print the series name on the bottom right.  (Rural Land Zone: <dyn type="page" property="name"/>)

0 Kudos
JonathanDandois
Occasional Contributor

Thanks, but I think the property="datePrinted" is a different type of element. I am trying to pull dynamic text from an attribute tied to a feature the Spatial Map Series. that's where the format tag seems to be failing, that it doesn't support that kind of dynamic text. When I follow the above steps from @AubriKinghorn i get this wonderfully complex dynamic text.

Feels janky to me, but it works!

JonathanDandois_0-1697140057878.png

 I don't think this type of Dynamic Text is supposed to be edited in "Plain text" "code" mode though, and should only be edited as in the below flowchart using this "Insert Table Attribute" dialog which brings Arcade into the mix! 

JonathanDandois_1-1697140162284.png

 

0 Kudos