Select to view content in your preferred language

Analysis Widget, Custom Python Web Tool: Dynamic Parameters Auto Population

494
4
Jump to solution
08-29-2024 12:15 PM
SerjStol
Frequent Contributor

Hello,

I have a Python GP Tool (Python Toolbox) in ArcGIS Pro (3.16) where I have parameters conditionally populated based on the previous parameter selection.

If parameter 1 is  layer A name, then the code fetches all features from the layer A and populates attribute names in a filter list in parameter 2 drop down. 

I used ArcGIS Enterprise (11.3) Hosted Feature Layers rest endpoints in the code (arcpy.MakeFeatureLayer_management(rest_endpoint_url, "lyr_name") and the tool works fine in ArcGIS Pro. However, when published to Enterprise as a Web Tool and configured this custom tool in the Experience Builder Analysis widget, the tool only populates the default values from the time I ran it in Pro, and parameters do not get dynamically populated.

Am I correct in thinking this conditional logic is not supported in a custom Web Tool? Or do I need to code it specifically?

Many thanks!

0 Kudos
1 Solution

Accepted Solutions
SerjStol
Frequent Contributor

I had a reply from esri that its currently not supported. Tool Validation that works in ArcGIS Pro to dynamically update parameters will NOT work in ArcGIS Enterprise when published.

View solution in original post

0 Kudos
4 Replies
Wei_Ying
Esri Regular Contributor

Hi @SerjStol ,

Thanks for sharing. The parameters other than the Param 1, are all derivate right?  
Can you share the tool for us to investigate or can you share some details about the GP tools you used? 

0 Kudos
SerjStol
Frequent Contributor

Thanks for the reply. I have sent a copy of the python toolbox to your inbox. The params are "Input" and not derived type as it needs to be specific attribute values (names of features) queried and populated dynamically in parameters depending on the param 1 choice (feature layer).

0 Kudos
SerjStol
Frequent Contributor

I had a reply from esri that its currently not supported. Tool Validation that works in ArcGIS Pro to dynamically update parameters will NOT work in ArcGIS Enterprise when published.

0 Kudos
Wei_Ying
Esri Regular Contributor

Yes, we are working on to support the dynamic parameter updates. 

0 Kudos