Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

177221
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
Eric,

   I dont think "print using system dialog" is something most endusers will know how to do either. I will look into it some more and see if there is a work around.
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
Robert,

I have a LINE feature class that participates in a relationship class with a table called FILE_TABLE.  Within the file table are record that contain PATH field values (images associated with the line) that point to a virtual directory within the Flexviewer.  I created the relationship because joins aren't sufficing for us.  A given line may have multiple files associated with it.  We have been using a join to the file table, but the join as you know, only returns the first match.

I am trying to enable the hyperlink (for the PATH field) in related records returned by the search (by adding hyperlinkgridfield to the field tag), but when I click on it it says invalid argument.

I may be going about this completely wrong?

Derek Hunter


Is there a way to enable
Casey,

   I don't know what else to tell you as I have now setup a Featureclass, a table, and a relationship Class in an Enterprise Geodatabase and tested a link to a pdf from a field in the related table and it works fine....
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Derek,

  I can not tell you much of anything without seeing your layers XML configuration in the eSearchWidget.xml.
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
<layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Pipeline</name>
   <url>http://ecs-gis.com/arcgis/rest/services/Search/MapServer/3</url>
   <expressions>
    <expression alias="Segment Name" textSearchlabel="Search by Segment Name...">
     <values>
      <value prompt="Example: johnston">FEATURE_NAME LIKE '%[value]%'</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical Search tools to select Centerline Corridors</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>FEATURE_NAME</titlefield>
   <fields all="false">
    <field name="ANC" alias="ANC" visible="true" gridfield="true"/>
    <field name="FEATURE_NAME" alias="Name" visible="true" gridfield="true" />
    <field name="LAYER" alias="Layer" visible="true" gridfield="true"/>
    <field name="CLASS" alias="Class" visible="true" gridfield="true"/>
    <field name="COMMODITY" alias="Commodity" visible="true" gridfield="true"/>
    <field name="DIAMETER" alias="Diameter" visible="true" gridfield="true"/>
    <field name="PL_STATUS" alias="Status" visible="true" gridfield="true"/>
    <field name="PATH" alias="Files" visible="true" hyperlinkgridfield="true"/>
    <field name="URL" alias="Videos" visible="true" hyperlinkgridfield="true"/>
    <field name="GIS_LENGTH" alias="Line Length" numberformat="0||" visible="true" gridfield="true"/>
    <field name="HORIZONTAL_LENGTH" alias="Length" numberformat="0||" visible="true" gridfield="true"/>
    <field name="ROFILE_LENGTH" alias="Profile Length" numberformat="0||" visible="true" gridfield="true"/>
   </fields>
   <links/>
   <zoomscale usegeometry="true" zoompercent="1.1"/>
   <autoopendatagrid>true</autoopendatagrid>
   <queryattachments>false</queryattachments>
   <relates>
    <relate id="0" label="File" enableprintgrid="true" icon="assets/images/i_hydro.png" printtitle="Related Files">
     <fields all="true" />
     <zoomscale usegeometry="true" zoompercent="1.2" />
    </relate>
   </relates>
   <symbology>
    <simplefillsymbol color="0x0000ff" alpha="0.5">
     <outline color="0x00ffff" alpha="0.8" width="2" />
    </simplefillsymbol>
   </symbology>
  </layer>




Derek,

  I can not tell you much of anything without seeing your layers XML configuration in the eSearchWidget.xml.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Derek,

   How exactly are you defining a hyperlink field for the relate when you are just using fields all = true?

<relate id="0" label="File" enableprintgrid="true" icon="assets/images/i_hydro.png" printtitle="Related Files">
    <fields all="true" />
    <zoomscale usegeometry="true" zoompercent="1.2" />
</relate>


If you want a hyperlink in the related data then you have to tell it which field is going to be the hyerlinkfield.

Like this:

                <relate id="3" label="Signs" enableexport="false" enableprintgrid="true" icon="assets/images/i_lego.png">
                    <fields all="false">
                        <field name="Type" />
                        <field name="Road_ID" />
                        <field name="Condition" />
                        <field name="P_Hyper" />
                        <field name="Image_" hyperlinkgridfield="true" hyperlinkgridicon="assets/images/i_lego.png"
                            hyperlinkaliastext="Get Sign Image" linkprefix="" linksuffix="" />
                        <field name="post" />
                    </fields>
                    <zoomscale usegeometry="true" zoompercent="1.6" />
                </relate>
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
Sorry...meant to say all I used was hyperlinkgridfield="true".

I attached a screenshot of the results which is now showing relates, however, the record height is very small.  Have you seen that?


[ATTACH=CONFIG]30290[/ATTACH]
Derek,

   How exactly are you defining a hyperlink field for the relate when you are just using fields all = true?

<relate id="0" label="File" enableprintgrid="true" icon="assets/images/i_hydro.png" printtitle="Related Files">
    <fields all="true" />
    <zoomscale usegeometry="true" zoompercent="1.2" />
</relate>


If you want a hyperlink in the related data then you have to tell it which field is going to be the hyerlinkfield.

Like this:

                <relate id="3" label="Signs" enableexport="false" enableprintgrid="true" icon="assets/images/i_lego.png">
                    <fields all="false">
                        <field name="Type" />
                        <field name="Road_ID" />
                        <field name="Condition" />
                        <field name="P_Hyper" />
                        <field name="Image_" hyperlinkgridfield="true" hyperlinkgridicon="assets/images/i_lego.png"
                            hyperlinkaliastext="Get Sign Image" linkprefix="" linksuffix="" />
                        <field name="post" />
                    </fields>
                    <zoomscale usegeometry="true" zoompercent="1.6" />
                </relate>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Derek,

   I don't think I have ever had anyone just try to use one field as it also be a hyperlink... Try adding an field as well as the hypelink field.
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
It was because I did not have the i_relate.png in the Search asset\images folder.

Can you tell me if this same ability for relates is available for the Identify tool?  Not seeing it in 3.5

Thank for you help!

Sorry...meant to say all I used was hyperlinkgridfield="true".

I attached a screenshot of the results which is now showing relates, however, the record height is very small.  Have you seen that?


[ATTACH=CONFIG]30290[/ATTACH]
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Derek,

   Nope, the Identify Widget does not support relates.
0 Kudos
KevinHighland
Frequent Contributor
Hi Robert,

First of all - thank you so much for all your help over the years. You are an invaluable asset to the GIS community.

I'm having an issue with the enhanced search widget. Every time I switch <fields all=" from "true" to "false", I get an error when I search on that layer that says
[RPC Fault faultString="Invalid or missing input parameters." faultCode="400" faultDetail=""]


It works fine when I change it back to <fields all="true">. I want to use "false" because I would like to use the results in the data grid.

Attached is my eSearchWidget.xml. My layer has a join on it, but I am using the correct field names.

What am I missing?


Thanks,
Kevin

EDIT: viewer version: 3.6, widget version 3.6.1.
0 Kudos