Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

178781
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
RhettZufelt
MVP Notable Contributor
well, my config is in the eSearchWidget.xml I set this: <popupsdisabled>true</popupsdisabled>  (by default it is false).  That is the only change needed to the eSearchWidget.

Here is one of my popupconfig files, though you will need to customize it using your data.  Best to go to the rest endpoint for your service in the browser and copy/paste the field names, as misspelling/CaSe issues are the most common mistake setting these up.

Can follow the link at the bottom of the popupconfig to see the documentation for it (this example doesn't utilize attachments or photos or related records).

<?xml version="1.0" ?>
<configuration>
    <title>{OSE_ID}</title>


 <fields>
  <field name="OSE_ID" alias="OSE_ID" visible="true" />
  <field name="CLASSIFICATION" alias="CLASSIFICATION" visible="true" />
  <field name="REMOVAL_ACTIVITIES" alias="REMOVAL_ACTIVITIES" visible="true" />
  <field name="MRSTEW_DESC" alias="MRSTEW_DESC" visible="true" />
  <field name="DESG_AREA" alias="Designated Area" visible="true" />
  <field name="OPER_UNIT" alias="Operable Unit" visible="true" />
  <field name="OSE_REPORT" alias="OSE Report" visible="true" />
  <field name="MRSTEW_COMMENT" alias="MRSTEW_COMMENT" visible="true" />
  <field name="TURNOVER_AREA" alias="Turnover Area" visible="true" />
        <field name="PHOTOS" alias="PHOTOS" visible="false"/>
        <field name="PHOTO" alias="PHOTO" visible="false"/>
        <field name="GALLERY" alias="GALLERY" visible="false"/>
        <field name="GALLERY2" alias="GALLERY2" visible="false"/>
  <field name="NORTHING" alias="Northing" visible="true">
   <format precision="0" usethousandsseparator="true" />
  </field>
  <field name="EASTING" alias="Easting" visible="true">
   <format precision="0" usethousandsseparator="true" />
  </field>
  <field name="DATE_REMOVED" visible="true">
   <format dateformat="shortDate" useutc="true" />
  </field>
 </fields>

 <medias>
 </medias>
    <showattachments>false</showattachments>
    <showrelatedrecords>false</showrelatedrecords>
</configuration>

<!--

    See pop-up documentation at
    http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Pop_up_configuration_files/01m30000002q000000/
-->


The link will also show examples of how to load the layer(s) within the config.xml to "assign" the proper popupconfig.xml file.
R_
0 Kudos
ThanhThai
Emerging Contributor
Cool. Many thanks.
0 Kudos
KathrynSmith
Deactivated User
Great widget, Robert.
Have a question... We have a link to sample description sheets in the pop-up that are sometimes scanned as a PDF and other times a JPG. When it is a JPG, a small image of the JPG displays in the pop-up rather than the link alias text (see attached image for example). Can I modify the code to not display this image in the pop-up? We'd rather consistently have the text "Download Core Description Sheet". I do not have the icon set (using default), but that appears to only affect the search results window, not the pop-up. Code is below in case I have missed something... Thanks!

            <fields all="false">
                <field name="FIELD_ACTIVITY_ID" alias="FIELD ACTIVITY NUMBER (FAN)" gridfield="false"/>
                <field name="SAMPLE_ID" alias="SAMPLE/CORE ID" gridfield="false"/>
                <field name="SPECIFIC_PLACE" alias="SPECIFIC PLACE" gridfield="false"/>
                <field name="MATERIAL" alias="MATERIAL" gridfield="false"/>
                <field name="CORAL_SPECIES" alias="CORAL SPECIES" gridfield="false"/>
                <field name="DEVICE" alias="DEVICE" gridfield="false"/>
                <field name="DATE_COLLECTED" alias="DATE COLLECTED (yyyymmdd)" gridfield="false"/>
                <field name="CORE_LENGTH_CM" alias="LENGTH (cm)" gridfield="false"/>
                <field name="WATER_DEPTH_M" alias="WATER DEPTH (m)" gridfield="false"/>
                <field name="PI_NAME" alias="PRINCIPAL INVESTIGATOR NAME" gridfield="false"/>
                <field name="DISPOSITION" alias="DISPOSITION" gridfield="false"/>
                <field name="CURATOR_NAME" alias="CURATOR NAME" gridfield="false"/>
                <field name="CURATOR_EMAIL" alias="CURATOR EMAIL" gridfield="false"/>
                <field name="STORAGE_FACILITY" alias="STORAGE FACILITY" gridfield="false"/>
                <field name="ROOM" alias="ROOM" gridfield="false"/>
                <field name="FLOOR" alias="FLOOR" gridfield="false"/>
                <field name="STACK_WALL" alias="STACK/WALL" gridfield="false"/>
                <field name="COLUMN_" alias="COLUMN" gridfield="false"/>
                <field name="ROW_" alias="ROW" gridfield="false"/>
                <field name="USGS_PUB_URL" alias="USGS PUBLICATION" hyperlinkgridfield="false" hyperlinkaliastext="Open USGS Publication" visible="false"/>
                <field name="DESCRIPTION_URL" alias="CORE DESCRIPTION" hyperlinkgridfield="false" hyperlinkaliastext="Download Core Description Sheet" visible="false"/>
                <field name="PHOTO_URL" alias="CORE PHOTO" hyperlinkgridfield="false" hyperlinkaliastext="Open Core Photo" visible="false"/>
                <field name="DIGI_CORE_PROFILE_URL" alias="DIGITIZED CORE PROFILE" hyperlinkgridfield="false" hyperlinkaliastext="Download Digitized Core Profile" visible="false"/>
                <field name="ANALYSES_URL" alias="ANALYSES" hyperlinkgridfield="false" hyperlinkaliastext="Download Analysis Data" visible="false"/>
                <field name="OTHER_PUB_URL" alias="OTHER PUBLICATION" hyperlinkgridfield="false" hyperlinkaliastext="Open Other Publication" visible="false"/>
            </fields>
            <links>
                <link alias="Open USGS Publication" disablelinksifnull="true"><![CDATA[{USGS_PUB_URL}]]></link>
                <link alias="Download Core Description Sheet" disablelinksifnull="true">
                    <![CDATA[{DESCRIPTION_URL}]]>
                </link>
                <link alias="Download Digitized Core Profile" disablelinksifnull="true"><![CDATA[{DIGI_CORE_PROFILE_URL}]]></link>
                <link alias="Open Core Image" disablelinksifnull="true">
                    <![CDATA[{PHOTO_URL}]]>
                </link>
                <link alias="Download Analyses URL" disablelinksifnull="true"><![CDATA[{ANALYSES_URL}]]></link>
                <link alias="Open Other Publication" disablelinksifnull="true"><![CDATA[{OTHER_PUB_URL}]]></link>
            </links>

[ATTACH=CONFIG]26521[/ATTACH]
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Kathryn,

   There is no configuration change (i.e. xml tag) that is available to change that. The behavior of displaying the image thumbnail is built into the viewers popup. You can disable this behavior in the code (MXML source code) is you have a Flex IDE and acess to the source code.
0 Kudos
ThanhThai
Emerging Contributor
Hi Robert,

Is there a way to increase the height of the search window, as I'm trying to display several search fields on the widget's startup and don't want the user having to manually drag the lower right corner of the window or scroll down?

Thanks,

Thanh
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Thanh,

   You can specify the width and height of any widget by adding the height and width attributes to the widget tag in the main config.xml

Documentation:
http://resources.arcgis.com/en/help/flex-viewer/concepts/01m3/01m30000001w000000.htm
0 Kudos
GeorgeHaskett
Deactivated User
Problem: My results table is only showing (1) item per search even when there are multiple features that meet the same search perimeters.

I have used the eSearch on multiple Viewer for Flex apps in the past without problems.  I recently added a new map service that is brings in a table view from an IBM DB2 table.  In other words, an IBM DB2 table was added to the map I am using to create the map services in question.   This is the first time I have done so.  In the past the tables I pulled in were dbf files, etc.

Could this be happening because the table I am pulling in doesn't have an ObjectID field?  Is there anyway to create one in DB2 so I don't have to export it out to a different file?  We were hoping to link directly into the DB2 database.

Is anyone else pulling in data from an IBM DB2 database?  If so, are you having to do something different in the esearch perimeters?


I am using Viewer for Flex 3.4 and ArcGIS Server 10.1.

Thanks,

Haskett
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
George,

   I have no experience with IBM DB2 Views so can not tell you if this type of table is even supported. Is this table where you can share the URL for me to test?
0 Kudos
GeorgeHaskett
Deactivated User
Rob,

Thanks for you reply.  Unfortunately this map isn't for the university gig.  The company I'm working on this project for has everything set up for internal use only so I don't think there is a way to share the table.

I'm testing a few things on my end, however I think its because its a table view and does not have the objectID field...

Thanks again,

Haskett
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
George,

   When you try to do the same query from the REST end point do you get all the results you expect? Does the table have any special fields like raster field, GUID, or some thing?
0 Kudos