Add custom text element to print layout in print widget

4824
3
Jump to solution
01-10-2021 06:21 AM
Labels (1)
MHasan
by
New Contributor II

Hello everyone.

I have been trying to create a printing service from tools published from ArcGIS Pro using the following tutorial:

Share custom layouts for printing from ArcGIS Pro—ArcGIS Server | Documentation for ArcGIS Enterpris...

I want to add a custom text element and let the user enter the text value in the print widget.

The tutorial indicates that :

"If you want to insert a custom text element, add a text element and embed the element's name in a set of open and closed curly braces, such as {parcel-id}."

But it doesn't tell how and where to embed the element name.

 

0 Kudos
1 Solution

Accepted Solutions
LongDinh
Occasional Contributor II

Hi MHasan,

I was also perplexed by this vague description as well. Luckily I found the solution by looking at the default installation templates.

The name of the element is the Table of Contents when in Layout mode. Adding a open and closed curly bracket will add the element to the Print Layout Template JSON's "customTextElements" array.

Below is a screen capture of the "Get Layout Templates Info" which has successfully added the "{VeryCustomElementName}" dynamic element to the print template

LongDinh_0-1613970623211.png

 

View solution in original post

3 Replies
LongDinh
Occasional Contributor II

Hi MHasan,

I was also perplexed by this vague description as well. Luckily I found the solution by looking at the default installation templates.

The name of the element is the Table of Contents when in Layout mode. Adding a open and closed curly bracket will add the element to the Print Layout Template JSON's "customTextElements" array.

Below is a screen capture of the "Get Layout Templates Info" which has successfully added the "{VeryCustomElementName}" dynamic element to the print template

LongDinh_0-1613970623211.png

 

MHasan
by
New Contributor II

Thank you very much @LongDinh 

It's really easy but it wasn't obvious from the documentation.

0 Kudos
BugPie
by
Occasional Contributor III

The screen shot was the winning piece. Thanks for sharing that visual aid. Man, I've been stuck on this one... no more!