Select to view content in your preferred language

Enhanced Search Widget for FlexViewer 2.1

138372
767
10-25-2010 02:13 PM
RobertScheitlin__GISP
MVP Emeritus
All Here is my next widget in the FlexViewer 2.1 series

Special thanks to Erwan Caradec for contributing to this code.

The Enhanced Search Widget extends the standard search widget with a floating data grid and a new spatial query w/buffering.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e
Tags (2)
0 Kudos
767 Replies
SimonMorgan
Frequent Contributor
Simon,

   Is there anything unusual about this service? Complicated join, GUID or other custom field?


Nothing intentional. It does have a raster field which has caused me problems with Flexviewer but that is turned off. Here is the page on the layer in question:

Layer: Encroachments (ID: 7)
Display Field: Reporter

Type: Feature Layer

Geometry Type: esriGeometryPoint

Description:

Definition Expression: EncroachmentStatus IN ( 'Resolved' , 'Pending visit' , 'Pending response' , 'New' , 'Higher Authority' )

Copyright Text:

Min. Scale: 0

Max. Scale: 0

Default Visibility: True

Extent:

XMin: 440683.433
YMin: 4951796.652625
XMax: 474383.583175
YMax: 5004903.841325
Spatial Reference: 26915

Has Attachments: True

HTML Popup Type: esriServerHTMLPopupTypeAsHTMLText

Drawing Info:

Renderer:

Unique Value Renderer:

Field 1: EncroachmentStatus
Field 2:
Field 3:
Field Delimiter: ,
Default Symbol:

Unsupported Symbol

Default Label:
Unique Value Infos:

Value: New
Label: New
Description:
Symbol:

Picture Marker Symbol:


Value: Pending response
Label: Pending response from homeowner
Description:
Symbol:

Picture Marker Symbol:


Value: Pending visit
Label: Pending visit with homeowner
Description:
Symbol:

Picture Marker Symbol:


Value: Higher Authority
Label: Referred to Higher Legal Authority
Description:
Symbol:

Picture Marker Symbol:


Value: Resolved
Label: Resolved
Description:
Symbol:

Picture Marker Symbol:


Transparency: 0
Labeling Info: N/A

Fields:
OBJECTID (Type: esriFieldTypeOID, Alias: OBJECTID)
InvDate (Type: esriFieldTypeDate, Alias: A Date Reported, Length: 36 )
Reporter (Type: esriFieldTypeString, Alias: B Officer Badge#/Staff Initials, Length: 50 )
ReporterPhone (Type: esriFieldTypeString, Alias: B1 ReporterPhone, Length: 15 )
ReporterEmail (Type: esriFieldTypeString, Alias: B2 Reporter Email, Length: 150 )
ReporterNotes (Type: esriFieldTypeString, Alias: C Encroachment Notes, Length: 255 )
ReportSource (Type: esriFieldTypeString, Alias: D Report Source, Length: 50, Domain: Coded Values: [SWAN: SWAN], [PS GPS: Public Safety GPS], [DIRECT: Phone or Email], ...1 more... )
PSCaseID (Type: esriFieldTypeString, Alias: H PS Case Number, Length: 15 )
Category (Type: esriFieldTypeSmallInteger, Alias: F Category, Domain: Range: [1, 3] )
FacilityAffected (Type: esriFieldTypeString, Alias: I Facility Affected, Length: 25, Domain: Coded Values: [AC: AC], [Anderson Lakes: Anderson Lakes], [Baker: Baker], ...24 more... )
Homeowner (Type: esriFieldTypeString, Alias: J Homeowner, Length: 75 )
PropertyAddress (Type: esriFieldTypeString, Alias: K Property Address, Length: 150 )
EncroachmentStatus (Type: esriFieldTypeString, Alias: G Status, Length: 50, Domain: Coded Values: [New: New], [Pending visit: Pending visit with homeowner], [Pending response: Pending response from homeowner], ...3 more... )
HomeownerVisitDate (Type: esriFieldTypeDate, Alias: M Homeowner Visit Date, Length: 36 )
HomeownerVisitNotes (Type: esriFieldTypeString, Alias: N Homeowner Visit Notes, Length: 255 )
WarningLetterIssued (Type: esriFieldTypeString, Alias: O Warning Letter Issued, Length: 5, Domain: Coded Values: [YES: Yes], [NO: No] )
WarningLetterDate (Type: esriFieldTypeDate, Alias: P Warning Letter Date, Length: 36 )
WarningLetterNotes (Type: esriFieldTypeString, Alias: Q Warning Letter Notes, Length: 255 )
CitationIssued (Type: esriFieldTypeString, Alias: R Citation Issued, Length: 5, Domain: Coded Values: [YES: Yes], [NO: No] )
CitationIssuedDate (Type: esriFieldTypeDate, Alias: S Citation Issued Date, Length: 36 )
CitationNotes (Type: esriFieldTypeString, Alias: T Citation Notes, Length: 255 )
GISSiteReviewNeeded (Type: esriFieldTypeString, Alias: U GIS Site Review Needed, Length: 5, Domain: Coded Values: [YES: Yes], [NO: No] )
GISSiteReviewComplete (Type: esriFieldTypeString, Alias: V GIS Site Review Complete, Length: 50, Domain: Coded Values: [YES: Yes], [NO: No] )
GISSiteReviewDate (Type: esriFieldTypeDate, Alias: W GIS Site Review Date, Length: 36 )
GISSiteReviewNotes (Type: esriFieldTypeString, Alias: X GIS Site Review Notes, Length: 255 )
GISSiteReviewPacketLink (Type: esriFieldTypeString, Alias: Y GIS Site Review Packet Link, Length: 200 )
HomeownerVisit (Type: esriFieldTypeString, Alias: L Homeowner Visited?, Length: 5, Domain: Coded Values: [YES: Yes], [NO: No] )
Type (Type: esriFieldTypeString, Alias: E Type, Length: 50, Domain: Coded Values: [Dumping: Dumping], [Mowing: Mowing], [Planting: Planting], ...13 more... )
GISSiteReviewLead (Type: esriFieldTypeString, Alias: z GIS Site Review Lead, Length: 50 )
GISSiteReviewQAQC (Type: esriFieldTypeString, Alias: za GIS Site Review QA-QC, Length: 50 )
PhotoStatus (Type: esriFieldTypeString, Alias: zb PhotoStatus, Length: 10, Domain: Coded Values: [RF: Raster Field], [CA: Copied to attachments] )
Share (Type: esriFieldTypeString, Alias: H1 Share Outside PS, Length: 10, Domain: Coded Values: [YES: Yes], [NO: No] )
SHAPE (Type: esriFieldTypeGeometry, Alias: SHAPE)
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Simon,

   And your SearchWidget.xml configuration for this layer, I need to see that too.
0 Kudos
SimonMorgan
Frequent Contributor
Simon,

   And your SearchWidget.xml configuration for this layer, I need to see that too.


My apologies, that one should have been obvious:

<layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
      <name>Encroachments</name>
      <url>http://[SERVER]/ArcGIS/rest/services/PublicSafety/GPSData_v112111/MapServer/7</url>
      <expressions>
       <expression alias="Reported by/Badge Number" textsearchlabel="Search by badge number or reporter initials">Reporter like ('%[value]%')</expression>
       <expression alias="Homeowner Visits" textsearchlabel="Search by homeowner visit status" field ="HomeowneVisit" usedomain="yes">HomeownerVisit = ('[value]')</expression>
      </expressions>
      <graphicalsearchlabel>Use one of the graphical search tools to select encroachments</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>Type</titlefield>
      <linkfield linkprefix="" linksuffix="">GISSiteReviewPacketLink</linkfield>
   <icon isfield="true" iconprefix="" iconsuffix=""></icon>
      <fields all="false">
    <field name="Reporter" alias="Reporter" gridfield="true"/>
    <field name="GISSiteReviewPacketLink" alias="GIS Site Review Packet Link" hyperlinkgridfield="true" hyperlinkaliastext="Get Packet"/>
    <field name="ReporterNote" alias="Encroachment Inventory Notes" gridfield="true" gridfieldonly="true"/>
    <field name="InvDate" alias="Date Reported" gridfield="true" gridfieldonly="true" dateformat="MM/DD/YYYY" useutc="true"/>
   </fields>
      <zoomscale usegeometry="true">5000</zoomscale>
    </layer>
0 Kudos
MarkDumford
Emerging Contributor
Thanks Robert. I will take a crack at the new version tomorrow.

And thanks for the feedback on the GIS Server access problem. We are working on the crossdomain and/or proxy issue. It was strange that the application would work without problems in IE, but not in Mozilla or Chrome.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Simon,

   Give this correction a shot:

<field name="ReporterNotes" alias="Encroachment Inventory Notes" gridfield="true" gridfieldonly="true"/>
0 Kudos
SimonMorgan
Frequent Contributor
Simon,

   Give this correction a shot:

<field name="ReporterNotes" alias="Encroachment Inventory Notes" gridfield="true" gridfieldonly="true"/>


Good catch, but that did not fix the issue.
0 Kudos
SimonMorgan
Frequent Contributor
Robert,

I have a favor to ask. I have been asked to produce a quick solution. A user would like to be bale to select some polygons and see a total pop up of population. I have the data and I am thinking modifying your widget is the way to go. Maybe add a label to the data grid that displays the total of a preset field of the results currently selected, in this case popluation. Ihave a tight turn around, could you point the way for me? Or does anyone have a simpler solution?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Simon,

   have you looked at the sum capability of the eSearch datagrid?

<field name="Length_" numberformat="2|,|." sum="true" sumlabel="Total Length: " gridfield="true"/>
0 Kudos
BillLotz
Frequent Contributor
Simon,

have you looked at the sum capability of the eSearch datagrid?

<field name="Length_" numberformat="2|,|." sum="true" sumlabel="Total Length: " gridfield="true"/>

Hello Robert,
Sorry to be off topic, but I wanted to thank you for all the work that you are doing to help non programmers, such as myself.
With your (and others) help I am able to put together a nice useable site.
I appreciate it. Thanks and have a good holiday.
Bill
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bill,

   Your welcome and Happy Thanksgiving to you are well.
0 Kudos