Search widget fields

3033
5
Jump to solution
05-29-2014 06:30 AM
JoshWhite
Regular Contributor III
I am using the Search widget (not the eSearch)  and I am having issues with the fields.  First of all, whenever I try to change <fields all="true"> to false, I get a [RPC Fault faultString="Failed to execute query." faultCode="400" faultDetail=""].  When I change the value back to true, it runs just fine.  I am using 3.6 of the Flex Viewer.  Also on another similar note, one of my fields is based on a subtype so the field is an integer.  In the popup it displays the number instead of the Description, is there a way to change this.  I am using SDE as well. 
<?xml version="1.0" ?> <configuration label="Riverview Cemetery">     <zoomscale>50</zoomscale>  <initialview>text</initialview>     <layers>         <layer>             <name>Search by Last Name</name>             <url>http://70.167.59.150/maps/rest/services/CemeteryWeb/MapServer/12</url>             <expression>CemeteryRecords.LASTNAME like '[value]'</expression>             <textsearchlabel>Search by Last Name [ Example: WHITE or WHI%]</textsearchlabel>             <titlefield>CemeteryRecords.LASTNAME</titlefield>             <linkfield></linkfield>             <fields all="true">                 <field name="Spaces.SpaceID" alias="Space ID"/>                 <field name="Spaces.Space" alias="Space"/>                 <field name="Spaces.Lot" alias="Lot"/>                 <field name="Spaces.Block" alias="Block"/>                 <field name="Spaces.Addition" alias="Addition"/>                 <field name="CemeteryRecords.LASTNAME" alias="Last Name"/>                 <field name="CemeteryRecords.FIRSTNAME" alias="First Name"/>                 <field name="CemeteryRecords.M" alias="Middle Initial"/>                 <field name="CemeteryRecords.BIRTHDATE" alias="Birth Date" dateformat="MM/DD/YYYY"/>                 <field name="CemeteryRecords.DEATHDATE" alias="Death Date" dateformat="MM/DD/YYYY"/>                 <field name="CemeteryRecords.Notes" alias="Notes"/>                 </fields>         </layer>         <layer>             <name>Search by Space ID</name>             <url>http://70.167.59.150/maps/rest/services/CemeteryWeb/MapServer/12</url>             <expression>Spaces.SpaceID like '[value]'</expression>             <textsearchlabel>Search by Space ID  [ Example: WEST.10.1.3 or SOUTH.1.7(all CAPS)]</textsearchlabel>             <titlefield>Spaces.SpaceID</titlefield>             <linkfield></linkfield>             <fields all="true">                 <field name="Spaces.SpaceID" alias="Space ID"/>                 <field name="Spaces.Space" alias="Space"/>                 <field name="Spaces.Lot" alias="Lot"/>                 <field name="Spaces.Block" alias="Block"/>                 <field name="Spaces.Addition" alias="Addition"/>                 <field name="CemeteryRecords.LASTNAME" alias="Last Name"/>                 <field name="CemeteryRecords.FIRSTNAME" alias="First Name"/>                 <field name="CemeteryRecords.M" alias="Middle Initial"/>                 <field name="CemeteryRecords.BIRTHDATE" alias="Birth Date"/>                 <field name="CemeteryRecords.DEATHDATE" alias="Death Date"/>                 <field name="CemeteryRecords.Notes" alias="Notes"/>             </fields>         </layer>       <layer>             <name>Search by Lot ID</name>             <url>http://70.167.59.150/maps/rest/services/CemeteryWeb/MapServer/13</url>             <expression>LotID like '[value]'</expression>             <textsearchlabel>Search by Lot ID  [ Example: WEST.10.1 OR SOUTH.1 (all CAPS)]</textsearchlabel>             <titlefield>LotID</titlefield>             <linkfield></linkfield>             <fields all="false">                 <field name="LOT" alias="LOT"/>                 <field name="BLOCK" alias="BLOCK"/>                 <field name="ADDITION" alias="ADDITION"/>                 <field name="LotID" alias="Lot ID"/>                              </fields>         </layer>              </layers> </configuration> <!--     See Search widget tag reference at     http://links.esri.com/searchwidget -->
Josh White, AICP
Principal Planner

City of Arkansas City
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Josh,

   So this is definitely the same bug. Using fiddler I see that the outfields requested by the Query are these:

acgis.DBO.Spaces.SpaceID acgis.DBO.Spaces.Space acgis.DBO.Spaces.Lot acgis.DBO.Spaces.Block acgis.DBO.Spaces.Addition acgis.DBO.CemeteryRecords.LASTNAME acgis.DBO.CemeteryRecords.FIRSTNAME acgis.DBO.CemeteryRecords.M acgis.DBO.CemeteryRecords.BIRTHDATE acgis.DBO.CemeteryRecords.DEATHDATE acgis.DBO.CemeteryRecords.Notes acgis.DBO.Spaces.OBJECTID STATUS acgis.DBO.Spaces.STATUS

Notice the field name STATUS is unqualified once and fully qualified the other time. This is the issue because the REST end point does not recognize the unqualified STATUS field name and thus errors out. You should call esri tech support and get you name added to this bug so that it might get fixed quicker.

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Josh,

  Your field names need to contain the whole field name (acgis.DBO. as well as the rest of the field name).
0 Kudos
JoshWhite
Regular Contributor III
I added that in front of all fields name and still get the same result as before.  The other thing I can come up with is that maybe it doesn't like the join which causes the extra long field name with all of the dots?  This was switched from a file geodatabase to SDE but the problem  existed prior to that switch.  I just wanted to try to fix it again.  We are not in a position to stop using the joined table.  The table is imported into SDE as a table from an Excel spreadsheet.
Josh White, AICP
Principal Planner

City of Arkansas City
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Josh,

   esri has an bug with data that is joined and has a subtype. This is likely the issue you are running into. Since your service is public I will do some testing, but I am pretty sure that it is the subtype and join bug.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Josh,

   So this is definitely the same bug. Using fiddler I see that the outfields requested by the Query are these:

acgis.DBO.Spaces.SpaceID acgis.DBO.Spaces.Space acgis.DBO.Spaces.Lot acgis.DBO.Spaces.Block acgis.DBO.Spaces.Addition acgis.DBO.CemeteryRecords.LASTNAME acgis.DBO.CemeteryRecords.FIRSTNAME acgis.DBO.CemeteryRecords.M acgis.DBO.CemeteryRecords.BIRTHDATE acgis.DBO.CemeteryRecords.DEATHDATE acgis.DBO.CemeteryRecords.Notes acgis.DBO.Spaces.OBJECTID STATUS acgis.DBO.Spaces.STATUS

Notice the field name STATUS is unqualified once and fully qualified the other time. This is the issue because the REST end point does not recognize the unqualified STATUS field name and thus errors out. You should call esri tech support and get you name added to this bug so that it might get fixed quicker.
0 Kudos
JoshWhite
Regular Contributor III
Ok, they are going to add me to the NIM.  Thanks for your assistance.
Josh White, AICP
Principal Planner

City of Arkansas City
0 Kudos