Hey,
I would like to create a script/tool that will be used in web (geoprocess)
The idea is simple: Input is a layer (not fixed, so technically the fields layers can be different)
How can I do so that my tool can receive any layer, with different fields ?
Currently, by doing Share As of the Geoprocess Result, the Fields remain fixed according to the Layer that I used for the example..
Thanks for your help !
Hi, do I understand correctly that you are creating python geoprocessing tool?
If yes, you can use ListFields to get list of fields of any recieved layer.
https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/listfields.htm
It mainly depends on what do you want to do with this information.
If you need to receive a layer from JavaScript for this tool, the input type (in toolbox script) should be Feature Set. Is this what you are looking for?
Martin