Select to view content in your preferred language

Cascade Search in Flex

993
9
09-30-2013 07:06 AM
CarloBlasi
Emerging Contributor
Hello to All,

I would like to create a "wiget" (or modified one of the available) for performing cascade search reading different fields inside a data base!!!!

The fields will be:

Family
Gender
Species
etc...

When i select one family from the "Family" tab subsequently i want to find only the Gender (inside the Gender tab) related to the selected Family! Etc. Etc.

Is that possible!?

I'm using ArcGIS Flexviewer for Flex 3.4

There is someone that can help me?

Thank's in advance!

Edoardo
Tags (2)
0 Kudos
9 Replies
CarloBlasi
Emerging Contributor
UP!!!

no one????
0 Kudos
MattPohl
Frequent Contributor
Edoardo-

I have asked about this in regards the the eSearch Widget; see here. However this doesn't mean that it can not be accomplished through some customization, I just have not seen an example of it. If you do come up with something, I would be interested in seeing it.

Matt
0 Kudos
GeorgeHaskett
Deactivated User
I would imagine that you will need to either program a widget yourself via the API for Flex, or create a Python script and run it through the model builder, then publish it as a GeoProcessing service.  Which in turn you would use to create a basic shelled widget in the Viewer for Flex app.

I've created a couple of widgets this way.  They don't look fancy as you cannot control the look and feel of the GUI if you go the later route.

However, if you go the first route, via the API, then you can tweak the heck out of it.

Haskett
0 Kudos
JoeHewitt
Regular Contributor
It would depend on how big your data is.

I have implemented a similiar ability to the eSearch widget.

I have a drop down box that contains a list of my map services. Once the map service is selected, I have a drop down box populate with only the layers that relate to that specific selected Service. Its not doing a query but instead since I only have 3 services, I simply creating an if statement that removes layers from the dropdown that dont relate to my selected service.
And then I can create an SQL statement for that layer, inside that service.

Not a solution to this problem but might be relevant to you.
0 Kudos
CarloBlasi
Emerging Contributor
It would depend on how big your data is.

I have implemented a similiar ability to the eSearch widget.

I have a drop down box that contains a list of my map services. Once the map service is selected, I have a drop down box populate with only the layers that relate to that specific selected Service. Its not doing a query but instead since I only have 3 services, I simply creating an if statement that removes layers from the dropdown that dont relate to my selected service.
And then I can create an SQL statement for that layer, inside that service.

Not a solution to this problem but might be relevant to you.


Thanks for your answer Joe! Could be a solution........

Would you please send me the code? Do you mind?

I'm not able to programming in flash, but i can modify the script to see if I can get what I need!

If you don't want to post the code on the forum you can send it by email at edoardo.scepi@gmail.com

If you can not or do not want don't worry I completely understand!

Thanks in Advance!

Edoardo
0 Kudos
CarloBlasi
Emerging Contributor
I would imagine that you will need to either program a widget yourself via the API for Flex, or create a Python script and run it through the model builder, then publish it as a GeoProcessing service.  Which in turn you would use to create a basic shelled widget in the Viewer for Flex app.

I've created a couple of widgets this way.  They don't look fancy as you cannot control the look and feel of the GUI if you go the later route.

However, if you go the first route, via the API, then you can tweak the heck out of it.

Haskett


As I said to Joe I'm not able to program in flash, but in python maybe I can "create" something! Thanks for the advice

I keep you informed!

😉

Edoardo
0 Kudos
GeorgeHaskett
Deactivated User
Joe,

Is that something you were able to do in the Compiled or the Uncompiled version?

It would be great if you could share an example...

Edoardo,

Python is fairly straght forward, once you get through the process the first time, it only gets easier after that.  I'm assuming you have access to an ArcGIS Server license.

Haskett
0 Kudos
JoeHewitt
Regular Contributor
sorry about the delay in getting back to you.

I edited the uncompiled version of the esearch widget in Flashbuilder.


The esearch widget is massive so I wont post all of the code, as I also added other features like the ability to export my search result to a shapefile.


Here I create a Drop Down List, With a list of my services for the user to choose from

<s:DropDownList id="serviceDdl" change="serviceChanged(event)">
     
<s:ArrayList>
<fx:Object data="Tenements" label="Tenements" url="http://xxx/arcgis/rest/services/Tenements/MapServer"/>   
<fx:Object data="Drilling" label="Drilling" url="http://xxx/arcgis/rest/services/Drilling/MapServer"/>
    
</s:ArrayList>
</s:DropDownList>


As the DDL is changed, it calls servicechanged which calls my private function loadLayer which holds the code below


if (serviceDdl.selectedItem.data == "Drilling")
{
cboLayerText.dataProvider.removeItemAt(0);
cboLayerText.dataProvider.removeItemAt(0);
}


If Drilling service is selected then it removes the first two items of the cboLayerText combobox (Because those layers are not under the drilling service.

else if (serviceDdl.selectedItem.data == "Tenements")
{
cboLayerText.dataProvider.removeItemAt(3);
cboLayerText.dataProvider.removeItemAt(2);
}


If tenements is selected then it removes my last two layers from the combobox, because they are layers from the drilling service and not tenements service


cboLayerText is the combobox that grabs the url of the layer that is selected (which you set in the .xml config of the widget) Thus the search is done on my final selected layer


I don't know if any of these concepts work in Python.
0 Kudos
CarloBlasi
Emerging Contributor
Joe I do not know how to thank you!!!!!!!!!!

You gave me a huge help!

I am sure that with your "hint" I will be able to do something........

I'll keep you informed

Thanks again!!!!

Edo
0 Kudos