Hosted Feature Layer as input for custom script

996
6
02-15-2021 08:42 AM
mattkramer
Occasional Contributor

Hello,

I am trying to put together a tool that users will work with inside ArcPro that accepts a full hosted feature layer as an input.  Is there a parameter type that allows for this?  The "Layer File" and "Group Layer" and many other types I have tried only allow me to select one layer in the whole hosted feature layer instead of the whole thing. Here is a screenshot of where I am setting this:

mattkramer_0-1613407200320.png

 

A work around I have thought of is just having the users put in the id for the feature layer but I am trying to make this more straightforward than that.  

0 Kudos
6 Replies
by Anonymous User
Not applicable

There is probably a better way that someone else knows about but looking at the list of data types available, I'd give the Any Type a try and see what comes out the other end. Maybe you can parse the result (if needed) to create the url for the hosted feature layer.

0 Kudos
mattkramer
Occasional Contributor

Unfortunately the "Any Value" data type acts the same way as the feature layer.  I also tried to make the option a "Folder" to maybe select the overall hosted layer as the folder holding the layers and that did not work either, the folder data type does not allow you to access portal data.

0 Kudos
by Anonymous User
Not applicable
How about using getparameterastext?
0 Kudos
mattkramer
Occasional Contributor

I would be ok with accepting the layer as a text field but the problem is that users can not select the Hosted feature layer as an input.  When selecting the Hosted Feature Layer when setting the parameters, the only option is to "Open" the layer instead of hitting "Ok" to set it as an input.

0 Kudos
DavinWalker2
Esri Contributor

How about Feature Dataset?

0 Kudos
mattkramer
Occasional Contributor

The Feature Dataset option does not have access to the portal, but that does sound like the closest thing to the hosted layer.

0 Kudos