1

I have a print template that is used with the Export Web Map task. This print template contains place-holder fields that are replaced with actual values when the web map JSON is sent to the task for PDF generation. I have the place-holder fields being replaced with the real values but I need to add some static text to identify what the value represents. For example, instead of just throwing "123" on the top of the map it would be better to display "Lift Station ST-123".

The place-holder fields appear to be plain old text elements (Insert > Text) with an Element Name. I copied the place-holders from one map and pasted in the new print template so I might be missing something about how they SHOULD be created. I used Insert > Text to place a piece of text and, when compared to the Properties dialog of the place-holder, they look to be the same.

How do I add static text to this place-holder?

Along with adding some context to the displayed value, a single element with static and dynamic text is easier to move than two independent entities.

Update: I have the following text elements on my map.

text property = dp id : <dyn type="document" property="XXX"/>. On the Size and Position tab, the Element Name is blank. When printed, the static text remains but the XXX property is not inserted.

text property = pp Well No. : <dyn type="page" property="XXX"/>. On the Size and Position tab, the Element Name is blank. When printed, the static text remains but the XXX property is not inserted.

text property = XXX. On the Size and Position tab, the Element Name is XXX, exactly matching the CustomTextElement in the WebMapAsJson submitted to the ExportWebMap task. When printed, the XXX text is replaced by the value submitted in the JSON. This is the expected behavior but now I want to prepend static text to the dynamic value provided in JSON.

text property = dp w/ element name: <dyn type="document" property="XXX" />. On the Size and Position tab, the Element Name is XXX, exactly matching the CustomTextElement in the WebMapAsJson submitted to the ExportWebMap task. When printed, the entire value of the text property is removed and replaced by the value submitted in the JSON. The text displays the the dynamic value provided in the JSON (good) but strips the static text (bad).

1

Dynamic text is just a standard text box, so you can just double-click on the text box and add any additional text.

The dynamic text will look something like

<dyn type="page" property="attribute" field="textfield" domainlookup="true"/>

You can just add your text around it

Lift Station <dyn type="page" property="attribute" field="textfield" domainlookup="true"/>

And it'll print as you want

Lift Station ST-123

enter image description here

  • I tried this but the static text disappears. This is what I have The filename is: <dyn type="document" property="FILENAME"/> and on the Size and Position tab, the Element Name is FILENAME. The webmap JSON that gets sent to the GP service contains a customTextElements array containing a key-value pair (key = FILENAME) that replaces the entire text string. – DenaliHardtail May 12 '17 at 21:03
  • @DenaliHardtail Can you add some of that info to your question, and maybe include what you've got in your map vs what you see in the JSON? – Midavalo May 12 '17 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.