Select to view content in your preferred language

Custom Print Service - print dynamic text from feature layer

1351
5
07-24-2024 12:11 AM
Ankitkhanna
Regular Contributor

Hi All, I am seeking advice on populating dynamic text from feature layer in my custom print layout on Enterprise 11.1 to be used in Experience builder OOTB print widget.

I have designed new layout in ArcGIS Pro, which contains 1 Map Frame and Text elements which includes dynamic texts (Insert > Dynamic Text > Table Attribute > Value) specific to Map Frame and Feature table fields.

I have exported layout as PAGX and registered templates with ArcGIS Server.

Then I published Export Web Map and Get Layout Templates Info tools as a web tool to portal.

 

I have followed above stated steps from here:

My print service is responsive on portal, I am able to add the service to Print widget in EXB; but the output Print results does not include the values of dynamic texts. 

Ankitkhanna_0-1721804909195.png

All these text on the left should populate values from the feature layer visible in MAP FRAME.

Please share any advice or tips. 

TIA, Ankit

 

 

0 Kudos
5 Replies
Ankitkhanna
Regular Contributor

An update on this, I have managed to get the fields populating with values now. The issue was related to my feature service which was not saving features created by editing widget. As features weren't saved in feature layer, values was not appearing while print. Now that is fixed.

BUT I have another issue with dynamic text fields, layout is configured to show values to VISIBLE ROWS of MAP FRAME. But while printing, dynamic text populates for all features in MAP EXTENT even if the features are not visible.

Is there any setting to enable to PRINT only VISIBLE rows not all while publishing LAYOUTS?

Ankitkhanna
Regular Contributor

@TanuHoquecould you please assist here, thanks.

0 Kudos
TanuHoque
Esri Regular Contributor

hi @Ankitkhanna 

I'm so sorry... I missed the notification. I hope you found the solution by now.

Just wanted to add a couple of points:

  1. I don't know exactly why 'visible only' not working. I think you might need to update the property of the dynamic text element in your arcpy code to reset it back to 'visible only'
  2. If you have a chance to move to 11.5, I'd highly recommend that. Because that is where dynamic-text-elements are fully supported throughout our stack. And you wouldn't need to roll out any custom solution. You author a layout template with dynamic text element, you share that with a print service, at the design phase in ExB, the print widget will recognize those dynamic text element, it will allow you to set their datasources... at the run time, all you need to do it pick the template in the print widget, and you will see output image from the print service populates dynamic text elements correctly

i hope this helps

Tanu

Ankitkhanna
Regular Contributor

Hi @TanuHoque we did tried on 11.1 by modifying the arcpy code, but it didn't worked then. So we end up creating custom print widget. The project has been delivered for more than a year ago, client is happy with the solution. But I will try in future if i have to something similar like this. Thanks for your response. Cheers, Ankit

TanuHoque
Esri Regular Contributor

I'm glad that you are able to get around that. I hope 11.5 and newer releases will make your life easier in that area.

 

0 Kudos