Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

179227
776
04-30-2013 03:58 PM
RobertScheitlin__GISP
MVP Emeritus
All,

   Here is a new thread to post questions and discuss the Enhanched Search Widget. The old thread was getting too long.
Tags (2)
776 Replies
RobertScheitlin__GISP
MVP Emeritus
Shawn,

   I tested Version 2.9.0.1 - 6-8-2012 using a joined map service and it worked fine.
0 Kudos
CaseyMcMillin
Emerging Contributor
Casey,

   Did you upgrade to 3.3.1 or 3.3.2?


Robert,
I am using the compiled version.  I upgraded to 3.3.2.  I hadn't copied the swf from the upgrade, but just did and it did not make a difference.
More information in the interest of narrowing down the issue, everything works fine in the preview pane of the application builder, but not in an actual browser.
0 Kudos
ShawnSimpson
Emerging Contributor
Shawn,

   I tested Version 2.9.0.1 - 6-8-2012 using a joined map service and it worked fine.


I've been combing through the XML file trying to see if I missed a syntax error and I have also been trying different combinations of things to see if there is two or more parameters not jiving with another. In doing this I have found that if I leave the fields tag set to show all, it works just fine. However, if I list the fields I want shown in the result display, the tool fails. Have you encountered this before?

To recap...

If I use the following code - all works:

<fields all="true"/>


If; however, I use the code below, the tool does not work:

<fields all="false">
 <field name="wStreetValve.SubtypeCode" alias="Type" gridfield="true" />  
 <field name="wStreetValve.ValveID" alias="ValveID" gridfield="true"/>
 <field name="wStreetValve.CMMSOrg" alias="Operating District" gridfield="true"/>
 <field name="wStreetValve.WaterType" alias="Water Type" gridfield="true"/>
 <field name="wStreetValve.Diameter" alias="Diameter" gridfield="true"/>
 <field name="wStreetValve.NormalPosition" alias="Normal Position" gridfield="true"/>
 <field name="IA_SVLV_Dimensions.Dimension_1" alias="Dimension 1" gridfield="true"/>
 <field name="IA_SVLV_Dimensions.Dimension_2" alias="Dimension 2" gridfield="true"/>
 <field name="IA_SVLV_Dimensions.Dimension_3" alias="Dimension 3" gridfield="true"/>
</fields>


In any event - At least it works 🙂

But - if you can think of or see anything I am doing wrong, I'd be most grateful. I'd rather limit the fields returned, if possible.

Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Shawn,

   The fact that it works with field all="true" tells me that you have an issue in your field names when you specify them. Flex is a case sensitive language. I would suggest triple checking you field names and case and eliminate fields one by one to diagnose the issue. Another thing is you can use a tool like fiddler to check the http traffic and see the response from ArcGIS Server.
0 Kudos
ShawnSimpson
Emerging Contributor
Shawn,

   The fact that it works with field all="true" tells me that you have an issue in your field names when you specify them. Flex is a case sensitive language. I would suggest triple checking you field names and case and eliminate fields one by one to diagnose the issue. Another thing is you can use a tool like fiddler to check the http traffic and see the response from ArcGIS Server.


Ahh - I was not aware that Flex was case sensitive. That is excellent to know! I'll follow your suggestion and run through my field names with a fine-tooth comb.

As an aside - Thank you for this excellent tool! It is much, much better than the one the viewer comes with.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Casey,

   I am not sure that you have the latest version in your testing environment. Can you hold down the Alt key and click on the eSearch widgets title bar and check the dialog that pops up says 3.3.2?
Also can you try switching the eSearchWidget.xml floatorfixed to float
<floatorfixed>float</floatorfixed><!-- possible values are fixed and float -->

and test again?
MAKE SURE
you clearing your browsers cache.

The reason for my asking this is I HAVE been able to duplicate you blank map situation with the popup in the upper left corner, but only when the relate is not getting the:
<zoomscale usegeometry="true" zoompercent="1.6" />
and in version 3.3.1 I added a change to the SearchWidgetFixedDG.swf to hard code a value if one is not found in the xml.
0 Kudos
ShawnSimpson
Emerging Contributor
Shawn,

   The fact that it works with field all="true" tells me that you have an issue in your field names when you specify them. Flex is a case sensitive language. I would suggest triple checking you field names and case and eliminate fields one by one to diagnose the issue. Another thing is you can use a tool like fiddler to check the http traffic and see the response from ArcGIS Server.


Robert,

I've ran through the configuration file and there are no case issues between how I specify my field names and how they are within the feature class. The only way I can get the tool to work within a join is if I let it display all fields in the popup. I even tried just adding a single field element within the fields parent element and as soon as I start restricting fields, the tool errors out. I also tried turning fields off within the MXD and doing that causes the tool to error as well.

Could the period within the full join name be causing the issue? Are there any additional attributes that I need to set within the field element? Considering that the query works, I'm wondering if the tool is having a hard time generating the popup?

Also - if it turns out that I have to run with <fields all="true">, how do I configure a datagrid?

Thanks for any help you can provide! It is most appreciated. 🙂

Not sure if this helps, but I should add that the popups (e.g., Identify) work just fine when simply clicking any feature. And within the popup XML for the feature class in question, the fields and field elements are specified the same way as I have been trying to do in the search.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Shawn,

   This is the exact configuration that I have working...

        <layer>
            <useamf>false</useamf>
            <definitionexpression></definitionexpression>
            <enableexport>true</enableexport>
            <name>Parcels Join Test</name>
            <url>http://gislap183/arcgis/rest/services/ParcelTest/MapServer/1</url>
            <expressions>
                <expression alias="Parcel ID" textsearchlabel="Search by Parcel ID:">
                    <values>
                        <value prompt="Example: 1998">Parcels3.PPIN = '[value]'</value>
                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select parcels</graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>Parcels3.PARCEL_NUMBER</titlefield>
            <fields all="false">
                <field name="Parcels3.PPIN" alias="Parcel Id" />
                <field name="Parcels3.PARCEL_NUMBER" alias="Parcel Number" />
                <field name="Parcels3.NAME" alias="Owner Name" />
            </fields>
            <links />
            <zoomscale usegeometry="true" zoompercent="1.2"></zoomscale>
        </layer>


If you can not get past this field issue you will be out of luck as far as the datagrid goes.
0 Kudos
CaseyMcMillin
Emerging Contributor
Casey,

   I am not sure that you have the latest version in your testing environment. Can you hold down the Alt key and click on the eSearch widgets title bar and check the dialog that pops up says 3.3.2?
Also can you try switching the eSearchWidget.xml floatorfixed to float
<floatorfixed>float</floatorfixed><!-- possible values are fixed and float -->

and test again?
MAKE SURE
you clearing your browsers cache.

The reason for my asking this is I HAVE been able to duplicate you blank map situation with the popup in the upper left corner, but only when the relate is not getting the:
<zoomscale usegeometry="true" zoompercent="1.6" />
and in version 3.3.1 I added a change to the SearchWidgetFixedDG.swf to hard code a value if one is not found in the xml.


Robert,
I must have forgotten to clear my cache after the last round of corrections (which would explain why it worked in the app builder preview and not in a browser).  It is finally working flawlessly!  Thank you again for your help.  That was above and beyond the norm, and it is very much appreciated!
Thanks again,
Casey
0 Kudos
ThomasColson
MVP Alum
I'm trying to populate a search (Esearch 3.3) with uniquevalsfromfield, and it's not working. The field in the GDB uses a domain. I see from the documentation that there are xml config params for domain and subtype, but the documentation does not explain how to use those XML flags, nor include any examples. Has anyone used domain or subtype in the esearch config xml and can post an example? Thanks.
0 Kudos