Select to view content in your preferred language

How to add feature service URL as input parameter for Python Geoprocessing Service

04-30-2024 02:06 AM
New Contributor

I've created a python toolbox in ArcGIS Pro 3.3 I wanted to have one of my input parameter as portal feature service so that I should be able to select feature service url. I have tried almost all input parameter datatype but none of them work well. please suggest

0 Kudos
1 Reply
Occasional Contributor III

How do you envisage "selecting a url"? Do you simply mean pasting it in? If so a string parameter would allow for that and then you could do whatever you wished with that url in your code.

If you need it to behave as per a feature class would etc. then if you set your input parameter to feature layer, and you add the feature service in question to Pro first and then it will then be selectable/drag and droppable as an input and that input type will also allow you to open the folder icon and navigate through the portal browser.

If you wanted to limit it to portal based items/hosted feature layers only then some additional validation rules could probably achieve that

0 Kudos