Dynamic Text in Custom Print Template

683
3
Jump to solution
11-06-2023 09:08 AM
Labels (1)
AnninaRupe1
New Contributor III

I need some help with a custom print template I created. I successfully created and shared a print template for use in WAB, including dynamic text (date printed, sources). However, there is one piece of dynamic text that didn't work: I would like to summarize the acres attribute of a layer visible in the map extent. I've followed the nice tutorial here, but the text where the sum value is blank.

I don't know where the issue might be, but I'm wondering about what's in the plain text view of the text element. When I have the layer in the Map frame, the "mapMemberUri" value is populated with a .json string, but as per the instructions, before the layout is exported, the layer needs to be removed. Once that is done, the plain text reads like this:
Conserved Acres:
<dyn type="table" property="sum" mapFrame="WEBMAP_MAP_FRAME" mapMemberUri="" isDynamic="true" field="activity_acres" decimalPlaces="2" separator="true"/> ac.

I don't know where to go from here--any ideas?
Thanks!

*Update: I modified the link above to reference the correct page I was referring to. Sorry for any confusion.

 

0 Kudos
1 Solution

Accepted Solutions
AnninaRupe1
New Contributor III

@TanuHoque 

Thanks for replying. I have been following the article (I referenced that in my original post). Turns out, though, the "Dynamic Print Service" toolbox that is attached to the article is different than the tools that are named the same in the "Server Tools" toolbox included with ArcPro. Once I downloaded/used the "Dynamic Print Service" toolbox associated with the article, everything worked. Solved!

View solution in original post

0 Kudos
3 Replies
TanuHoque
Esri Regular Contributor

@AnninaRupe1 

We have an article on this here: https://community.esri.com/t5/arcgis-enterprise-documents/print-dynamic-text-from-a-web-application/... 

please read it and give this a try, and let me know if you run into issues. This requires you to write a custom arcpy based print service.

0 Kudos
AnninaRupe1
New Contributor III

@TanuHoque 

Thanks for replying. I have been following the article (I referenced that in my original post). Turns out, though, the "Dynamic Print Service" toolbox that is attached to the article is different than the tools that are named the same in the "Server Tools" toolbox included with ArcPro. Once I downloaded/used the "Dynamic Print Service" toolbox associated with the article, everything worked. Solved!

0 Kudos
TanuHoque
Esri Regular Contributor

for some reasons, the link took me to some other post not the article. Anyways, I'm glad it works for you now! Unfortunately for now you need to use arcpy based custom print service (the one that comes with Pro won't help).

That will change (fingers crossed) started 11.2 where we will start rolling out capabilities that will allow you achieve your workflow w/o writing arcpy based custom solution. It will be the first cut and only with the support in the core print service and in js api level. It will take a couple of releases before it gets fully supported in web client apps. 🤞