Select to view content in your preferred language

Use selected features as input to analysis tool

2002
18
Jump to solution
03-15-2024 06:56 AM
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?

18 Replies
GFlonk
by
Occasional Contributor

I created a simple webtool today to test this functionality in Experience builder, and it doesn't seem to work in my case. I want to create a webtool that works with a sleection of records as input. For this I created a simple notebook with one parameter and published it as a webtool.

wt1.PNG

Then created a basic experience with just a table and the analysis widget. When i try to set the analysis tool input from the selection in the table I get this message:

wt2.PNG

When i look in the console we see this error:

wt3.PNG

Am i doing something wrong or am i encountering a bug?


0 Kudos
DougBrowning
MVP Esteemed Contributor

No the GP widget does not respect selections at all yet.  Which is super weird to release it without that.  No one runs a tool on an entire FC.

See farther up this post there is a hack posted.

Upvote here?  https://community.esri.com/t5/arcgis-experience-builder-ideas/use-selected-features-as-input-in-anal... 

0 Kudos
Wei_Ying
Esri Regular Contributor

The selection processing is available in ArcGIS Online, and for Enterprise, it is available in 11.4. 

0 Kudos
GFlonk
by
Occasional Contributor

Oh yeah I didn't specify; I tried this on ArcGIS Online.

Wei_Ying
Esri Regular Contributor

Hi @GFlonk , I guess the data you used as input is a private feature service hosted in some portal? 

0 Kudos
GFlonk
by
Occasional Contributor

Yes it is, though my account has access to it. I think what would help here is a simple step by step doing only the necessary to verify that in experience builder; we can add a table with data, and send its selection to a webtool, then in the webtool verify we receive a selection (only by printing or something). If i have that i can verify that flow works and could be a possible solution for clients i have. I tried doing exactly this myself and ran into the error i mentioned earlier.

Wei_Ying
Esri Regular Contributor

That's weird. I cannot reproduce based on your description. I guess it might be tool specific or data specific. 
I suggest you to contact Esri Support to provide us a repro case.  Appreciated!

0 Kudos
LisaT
by
Frequent Contributor

Hi Everyone, I am having a lot of trouble with this and am hoping someone can point me to a tutorial? I am trying to create a simple custom tool in AGOL that will take a selection from ExB.  I am currently trying to process it as a FeatureSet. I am currently attempting to do it by selecting a default input parameter of type FeatureSet. When I add it to ExB and also add a select widget (with Set as Analysis input using "Analysis") it doesn't seem to change the "Count of Features" when I change the Selection. What should I be seeing? Is there a tutorial for either an established Analysis tool or a custom one? 

DougBrowning
MVP Esteemed Contributor

Correct it is ignoring the selection which was a very weird thing to leave out. It has us at a standstill on converting now.   Last I heard it was "coming soon" but I still do not see it working.

0 Kudos