Select to view content in your preferred language

Use selected features as input to analysis tool

6674
23
Jump to solution
03-15-2024 06:56 AM
Labels (2)
LarsElmkær_Chwastek
Frequent Contributor

Hi all,

I have a question about using selected features in an analysis tool. I can't quite figure out how to make this work.

If I use the select tool to select let's say 10 houses from a building layer, I want to be able to take that building layer and use as an input to for instance the buffer tool.. 

But when I do that, it doesn't honor the selection.. it just takes all the features in the layer..

It would also be cool to be able to do the same with a GP/Web tool that you publish your self

Do anyone know a solution?

23 Replies
DougBrowning
MVP Esteemed Contributor

Yes we have found that some ways it works and some ways it does not.  Super confusing to the user.  

I have not made a breakdown of each of the different ways yet.

0 Kudos
MavTucker_CoMo
Emerging Contributor

Not sure if it was just updated, but I had this issue until I realized I needed to use the action button on the selection widget to set the selection as the input for the GP tool, NOT the select layer button on the GP tool in the analysis widget. Also, the input is received as a "RecordSet" object, (parameter should still be set to "featureSet"), I'm still working on parsing the RecordSet, my next try is to dump the JSON into a python dictionary to access the feature attributes, but like the comment below, I only get the first few attributes, so I guess I'll be collecting the OIDs to query from my hosted layer in a query.

0 Kudos
mody_buchbinder
Frequent Contributor

Hello all

We use the solution here to send some selected features to gp service.

The gp service gets the features but it looks like it does not gets all the attributes of each feature, only 2-3 attributes are send as part of the feature set.

Is that a bug?

Thanks

Wei_Ying
Esri Regular Contributor

It is a known limitation if you use Select widget to pass as input as Select widget laze load the data.
A work around is add a Table widget to load all the attributes you need and use the same data action "Set as analysis input" from the table after you made selections

0 Kudos