Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part II

113143
552
04-19-2012 08:03 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I am pleased to announce the next release of my eSearch Widget.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e

Version 2.5.1.7 - 4/19/2012
* Added ability to search (flat/standalone/no geometry) tables.
* This time all Zooming uses the same scaling (popup, datagrid, widget results, zoom to all).
* Added Relates icon/button to datagrids so that you can click on it in the datagrid to
  open relates choice dialog.
* Move all skins to a skins package for cleaner organization.
* Links that are not associated with a field now work.
* Ability to disable the relates tab in the fixed widget is now configurable.
552 Replies
RobertScheitlin__GISP
MVP Emeritus
Casey,

   Not much info to go on here....
0 Kudos
CaseyMcMillin
Emerging Contributor
Here is the configuration for the layer in question.  I'm not sure what else to offer.  Unfortunately the map is not public.

  <layer>
            <token/>
            <definitionexpression/>
            <enableexport>true</enableexport>
            <name>Sanitary Main</name>
            <url>http://GIS01.lebanon.local:6080/arcgis/rest/services/OperationalLayers/Utilities/MapServer/3</url>
            <expressions>
                <expression alias="Facility ID" textsearchlabel="Search Specific Main:" isvaluerequired="false">
                    <values>
                        <value prompt="Example: 1032" isvaluerequired="false">FACILITYID = '[value]'</value>
                    </values>
                </expression>
    <expression alias="Attributes" textsearchlabel="Search Mains:" isvaluerequired="false">
                    <values>
                        <value prompt="Type:" isvaluerequired="false" uniquevalsfromfield="TYPE" autosubmit="false" operator="AND">TYPE = '[value]'</value>
      <value prompt="Diameter:" isvaluerequired="false" uniquevalsfromfield="DIAMETER" autosubmit="false" operator="AND">DIAMETER = '[value]'</value>
      <value prompt="Material:" isvaluerequired="false" uniquevalsfromfield="MATERIAL" autosubmit="false" operator="AND">MATERIAL = '[value]'</value>
                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Main</graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>Sanitary Main</titlefield>
            <fields all="false">
                <field name="FACILITYID" gridfield="true"/>
                <field name="TYPE" gridfield="true"/>
                <field name="DIAMETER" gridfield="true"/>
                <field name="MATERIAL" gridfield="true"/>
                <field name="YEARBUILT" gridfield="true"/>
                <field name="EDITDATE" gridfield="true"/>
                <field name="INSPECTIONDATE" gridfield="true"/>
            </fields>
            <links/>
   <zoomscale usegeometry="true" zoompercent="2"/>
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates>
    <relate id="0" label="Asbuilts" enableprintgrid="false">
     <fields all="false">
      <field name="ASBUILTID" gridfield="true"/>
      <field name="FILEPATH" gridfield="true" hyperlinkgridfield="true" hyperlinkaliastext="View Asbuilt" linkprefix="\\hera\gis\Asbuilts\Scanned\" linksuffix=".pdf"/>
     </fields>
    </relate>
    <relate id="1" label="TV Projects" enableprintgrid="false">
     <fields all="false">
      <field name="TVPROJECT" gridfield="true"/>
      <field name="FILEPATH" gridfield="true" hyperlinkgridfield="true" hyperlinkaliastext="View TV Project"/>
     </fields>
    </relate>
   </relates>
            <symbology>
                <simplefillsymbol color="0xff0000" alpha="0.5">
                    <outline color="0xff0000" alpha="0.8" width="2"/>
                </simplefillsymbol>
            </symbology>
        </layer>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Casey,

   Event though you might consider this an intranet application the Flex Viewer is an internet application and thus you should not be using links that are using UNC paths. You need to create a virtual directory for your \\hera\gis\Asbuilts\Scanned\ folder that way you can add a real url to the link.
0 Kudos
Corbinde_Bruin
Frequent Contributor
Hello all,

I'm having an issue with relates. I see them in my mxd. I see them in my Rest service. I've failed to have eSearch pulling them up. I can search the layer and return results, but no related records show up in my data grid.
I'm using the 3.2.2 release.

"If you are using a layer that contains a join than the full join field name should be used." Is this true for relates as well? It doesn't seem to work either way. Here's my relates config:
<relates>
    <relate id="0" label="Contract Attachments" enableexport="true" enableprint= "true" icon="assets/images/i_folder.png">
     <fields all="false" >
      <field name="ContractNumber"/>
      <field name="ContractName"/>
       <field name="SMuniOrSAgency"/>
       <field name="WebRelativeImagePath" alias="Image" hyperlinkgridfield="true"  hyperlinkaliastext="Show Attachment"/>
     </fields>
     </relate>
   </relates>


Thank you for your time,
Corbin de Bruin
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Corbin de Bruin,

   Do you see the the relates listed at the bottom of the rest service page like this?

Relationships:

    calhoun.COUNTY.A_Bridge (0) -- Related To: ABIMS Bridges (0)
    calhoun.COUNTY.ADT (1) -- Related To: Average Daily Traffic (1)
    calhoun.COUNTY.Rail_Cross (2) -- Related To: Railroad Crossings (2)
    calhoun.COUNTY.Signs (3) -- Related To: Road Signs (3)
    calhoun.COUNTY.Guardrail (4) -- Related To: Guardrails (4)


Supported Operations:   Query   Query Related Records   Generate Renderer   Return Updates
0 Kudos
Corbinde_Bruin
Frequent Contributor

Do you see the the relates listed at the bottom of the rest service page like this?

Relationships:

calhoun.COUNTY.A_Bridge (0) -- Related To: ABIMS Bridges (0)
calhoun.COUNTY.ADT (1) -- Related To: Average Daily Traffic (1)
calhoun.COUNTY.Rail_Cross (2) -- Related To: Railroad Crossings (2)
calhoun.COUNTY.Signs (3) -- Related To: Road Signs (3)
calhoun.COUNTY.Guardrail (4) -- Related To: Guardrails (4)


Yes, I do. It is relate Id "0". And it functions properly in ArcMap as well.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Corbin de Bruin,

   OK, but the fact that it works in ArcMap is only half the battle. Now you need to test a Query of the related data using the REST End point. Can you post the test of your relates from the rest service page like I did?
0 Kudos
CaseyMcMillin
Emerging Contributor
Robert,

I created virtual directories as you suggested, but the hyperlink function is still causing errors in my map.  I have included the configuration xml file as well as screenshots before clicking the hyperlink field and after.  What is expecially interesting to me is where the pop-up for the feature end up after hitting the hyperlinked field.  The other oddity when the map goes white is that every widget tip when you hover over the widget tray displays as the Identify tool.  Any assistance would be greatly appreciated.

Thanks,
Casey
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Casey,

   I have tried everything to duplicate your error using the latest version of the eSearchWidget... I added a relate with a field that has a pdf file name in it and set that up using a virtual directory and added the linkprefix and linksuffix and worked fine... The only thing I see off in your xml is th fact that relate fields don not need the gridfield="true" attribute because they can only be in the grid, but I tested that too and I could not get an error... Are you using version 3.2.2 of the eSearch and Flex Viewer 3.2?
0 Kudos
Corbinde_Bruin
Frequent Contributor

   OK, but the fact that it works in ArcMap is only half the battle. Now you need to test a Query of the related data using the REST End point. Can you post the test of your relates from the rest service page like I did?


Relationships:
CountySDE.DBO.tblContracts (0) -- Related To: tblContracts (13)

Supported Operations:   Query   Query Related Records   Generate Renderer   Return Updates

Not sure if this is what you meant. I tried clicking the query button, but that form doesn't give me a lot of instructions and I'm not clear on what to put in each textbox. I was getting an error (Unable to complete operation) when I entered just a whereclause and tried to run it.
0 Kudos