esearch widget- RPC Fault Fault string="Invalid or Missing input Parameters

3310
16
Jump to solution
02-01-2013 07:37 AM
JayDira
New Contributor
Hello I was trying to configure the esearch widget to utilize our layers but when I run it I get:

RPC Fault Fault String="Invalid or Missing input Parameters." faultCode="400" faultDetail="

Below is my code...
Any help will be appreciated:
-----------------------------------------------------------------------------

<layers>
 

  <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>APN</name>
   <url>http://dbgis:6080/ArcGIS/rest/services/Parcels042012/MapServer/0</url>
 

   <expressions>
    <expression alias="APN" textsearchlabel="Search by APN:">

     <values>
      <value prompt="Example: 181001490000 ">APN LIKE '%[value]%'</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select Incidents</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>Parcel APN</titlefield>
   <fields all="false">
    <field name="APN" gridfield="true" />
    <field name="OWNER" gridfield="true" />
    <field name="ADDRES" gridfield="true" />
    <field name="CITY" gridfield="true" />
    <field name="STATE" gridfield="true" />
    <field name="ZIP" gridfield="true" />
   
   </fields>
   <links></links>
   <zoomscale usegeometry="true" zoompercent="1.6" />
   <autoopendatagrid>true</autoopendatagrid>
   <relates></relates>
   <queryattachments>true</queryattachments>
  </layer>

<layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Parcel Owner</name>
   <url>http://dbgis:6080/ArcGIS/rest/services/Parcels042012/MapServer/0</url>
   <expressions>
    <expression alias="OWNER" textsearchlabel="Search by Owner Name:">
     <values>
      <value prompt="Example: Joe Smith ">Owner LIKE '%[value]%'</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select Incidents</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>APN</titlefield>
   <fields all="false">
    <field name="APN" gridfield="true" />
    <field name="OWNER" gridfield="true" />
    <field name="ADDRES" gridfield="true" />
    <field name="CITY" gridfield="true" />
    <field name="STATE" gridfield="true" />
    <field name="ZIP" gridfield="true" />
   
   </fields>
   <links></links>
   <zoomscale usegeometry="true" zoompercent="1.6" />
   <autoopendatagrid>true</autoopendatagrid>
   <relates></relates>
   <queryattachments>true</queryattachments>
  </layer>
<layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>Parcel Address</name>
   <url>http://dbgis:6080/ArcGIS/rest/services/Parcels042012/MapServer/0</url>
   <expressions>

    <expression alias="ADDRESS" textsearchlabel="Search by ADDRESS:">


     <values>
      <value prompt="Example: 21825 Copley ">ADDRESS LIKE '%[value]%'</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select Incidents</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>APN</titlefield>
   <fields all="false">
    <field name="APN" gridfield="true" />
    <field name="OWNER" gridfield="true" />
    <field name="ADDRES" gridfield="true" />
    <field name="CITY" gridfield="true" />
    <field name="STATE" gridfield="true" />
    <field name="ZIP" gridfield="true" />
   
   </fields>
   <links></links>
   <zoomscale usegeometry="true" zoompercent="1.6" />
   <autoopendatagrid>true</autoopendatagrid>
   <relates></relates>
   <queryattachments>true</queryattachments>
  </layer>
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Jay,

   If your APN field is a numeric field than you need to adjust your SQL Expression for that use case:

<value prompt="Example: 181001490000 ">APN LIKE %[value]%</value>
Notice no single quotes tells the SQL that you are working with numbers.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

View solution in original post

0 Kudos
16 Replies
RobertScheitlin__GISP
MVP Emeritus
Jay,

   The only thing that jumps out at me when I quickly scan your xml is the fact that you have this SQL expression
ADDRESS LIKE '%[value]%'
and then you have the field name listed as ADDRES (notice on less S).
0 Kudos
JayDira
New Contributor
Thanks Robert...
That did the trick where I do not get the RPC error.

Now when I run the search and provide a APN, I do not get any result.
"Features selected: 0"

Not sure what I may be missing.
Thanks again with your quick reply.
0 Kudos
JayDira
New Contributor
Jay,

   The only thing that jumps out at me when I quickly scan your xml is the fact that you have this SQL expression
ADDRESS LIKE '%[value]%'
and then you have the field name listed as ADDRES (notice on less S).


Thanks Robert...
That did the trick where I do not get the RPC error.

Now when I run the search and provide a APN, I do not get any result.
"Features selected: 0"

Not sure what I may be missing.
Thanks again with your quick reply.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jay,

   If your APN field is a numeric field than you need to adjust your SQL Expression for that use case:

<value prompt="Example: 181001490000 ">APN LIKE %[value]%</value>
Notice no single quotes tells the SQL that you are working with numbers.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

0 Kudos
JayDira
New Contributor
Jay,

   If your APN field is a numeric field than you need to adjust your SQL Expression for that use case:

<value prompt="Example: 181001490000 ">APN LIKE %[value]%</value>
Notice no single quotes tells the SQL that you are working with numbers.

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:



Thanks Robert it worked.
Thank you for all your help...I just have one last thing.

The show result on grid always pop up automatically after each search.
Is there a way to disable it, until I click the "Show Results on Grid" button"
Thanks.
0 Kudos
JayDira
New Contributor
Thanks Robert it worked.
Thank you for all your help...I just have one last thing.

The show result on grid always pop up automatically after each search.
Is there a way to disable it, until I click the "Show Results on Grid" button"
Thanks.


Never mind I figured it out.
Thanks for all your help.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jay,

   There is a tag covered in the documentation called autoopendatagrid that should take care of your issue.

Not sure if you noticed or not but I moved your thread to the Flex Viewer forum out of the Flex API forum where you started it as all Flex Viewer and or widget questions belong here and not in the API forum.
0 Kudos
JordanBaumgardner
Occasional Contributor III
Folks, I'm having the same issue after an upgrade to 3.6

There is one query that worked (of course) in the old version and no longer works with my upgrade. I'm receiving the same error: Invalid or missing input parameters.

The table in question used to be in a <layer> tag, but it is not a feature class, and my understanding is that it should be moved to a <table> tag.

Of course the sample queries work great.

I'm beginning to think I need to set something up on the service itself, but I can't think of what that would be.

Here is my config entry:

Thank you in advance


  <table>
   <name>Customers</name>
   <token/>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <url>http://gisweb:6080/arcgis/rest/services/detailed/MapServer/84</url>
   <expressions>
    <expression alias="Location Code" textsearchlabel="Search Service by Location Code [ Example: 232410901 ]:" isvaluerequired="true">
     <values>
      <value prompt="Example: 232410901" isvaluerequired="true" >xx.METER.LOCATION_CODE = '[value]'</value>
     </values>
    </expression>
    <expression alias="Customer Name" textsearchlabel="Search Customer by Customer Name [ Example: FROST ]:" isvaluerequired="true">
     <values>
      <value prompt="Example: FROST" isvaluerequired="true" >upper(xx.METER.CUSTOMER_NAME) LIKE upper('[value]%')</value>
     </values>
    </expression>
    <expression alias="Billing Acct #" textsearchlabel="Search Customer by Account # [ Example: 487788 ]:" isvaluerequired="true">
     <values>
      <value prompt="Example: 487788" isvaluerequired="true" >xx.METER.ACCOUNT_NUMBER = '[value]'</value>
     </values>
    </expression>
    <expression alias="Service Street Address" textsearchlabel="Search Customer by Street Address [ Example: 850 COMMERCE RD ]:" isvaluerequired="true">
     <values>
      <value prompt="Example: 850 COMMERCE RD" isvaluerequired="true" >upper(xx.METER.SERVICE_ADDRESS_1) = upper('[value]')</value>
     </values>
    </expression>
   </expressions>
   <titlefield>xx.METER.CUSTOMER_NAME</titlefield>
   <fields all="false">
    <field name="xx.METER.LOCATION_CODE"/>
    <field name="xx.METER.ACCOUNT_NUMBER" gridfield="true" />
    <field name="xx.METER.CUSTOMER_NAME" gridfield="true" />
    <field name="xx.METER.SERVICE_ADDRESS_1" gridfield="true" />
    <field name="xx.METER.SERVICE_ADDRESS_2" gridfield="true" />
    <field name="xx.METER.SERVICE_CITY_STATE_ZIP" gridfield="true" />
    <field name="xx.METER.HOME_PHONE" gridfield="true" />
    <field name="xx.METER.ACCOUNT_STATUS" gridfield="true" />
   </fields>
   <links/>
  </table>

Table in question:

Layer: xx.METER (ID: 84)
Name: xx.METER 
Display Field: CUSTOMER_NAME 
Type: Table 
Geometry Type: N/A 
Description: null 
Definition Expression: 
Copyright Text: N/A 
Default Visibility: false 
MaxRecordCount: 1000
Supported Query Formats: JSON, AMF
Supports Advanced Queries: true
Supports Statistics: true
Extent:
Drawing Info:
N/A
HasZ: false 
HasM: false 
Has Attachments: false 
HTML Popup Type: esriServerHTMLPopupTypeNone 
Type ID Field: null
Fields:
OBJECTID ( type: esriFieldTypeOID , alias: OBJECTID )
LOCATION_CODE ( type: esriFieldTypeString , alias: Location Code , length: 30 )
METER_NUMBER ( type: esriFieldTypeString , alias: Meter Number , length: 30 )
CUSTOMER_NAME ( type: esriFieldTypeString , alias: Customer Name , length: 40 )
ACCOUNT_NUMBER ( type: esriFieldTypeString , alias: Account Number , length: 20 )
ACCOUNT_STATUS ( type: esriFieldTypeString , alias: Account Status , length: 10 )
BILLING_ADDRESS_1 ( type: esriFieldTypeString , alias: Billing Address 1 , length: 40 )
BILLING_ADDRESS_2 ( type: esriFieldTypeString , alias: Billing Address 2 , length: 40 )
BILLING_CITY_STATE_ZIP ( type: esriFieldTypeString , alias: Billing City, State, Zip , length: 40 )
SERVICE_DESC ( type: esriFieldTypeString , alias: Service Description , length: 40 )
SERVICE_ADDRESS_1 ( type: esriFieldTypeString , alias: Service Address 1 , length: 40 )
SERVICE_ADDRESS_2 ( type: esriFieldTypeString , alias: Service Address 2 , length: 40 )
SERVICE_CITY_STATE_ZIP ( type: esriFieldTypeString , alias: Service City, State, Zip , length: 40 )
HOME_PHONE ( type: esriFieldTypeString , alias: Home Phone Number , length: 40 )
SUBDIVISION ( type: esriFieldTypeString , alias: SUBDIVISION , length: 40 )
BLOCK_NUMBER ( type: esriFieldTypeString , alias: Block Number , length: 10 )
LOT_NUMBER ( type: esriFieldTypeString , alias: Lot Number , length: 10 )
APARTMENT ( type: esriFieldTypeString , alias: Apartment Number , length: 10 )
SUITE ( type: esriFieldTypeString , alias: Suite Number , length: 10 )
ON_DATE ( type: esriFieldTypeDate , alias: ON_DATE , length: 36 )
SECTION_ID ( type: esriFieldTypeString , alias: Line Section ID , length: 20 )
PRIMARY_METER ( type: esriFieldTypeString , alias: Primary Meter? , length: 1 , Coded Values:  ,  )
SERVICE_LOCATION_ID ( type: esriFieldTypeInteger , alias: Service Location ID (Foreign Key) )
CAYENTA_LOC_REC_NO ( type: esriFieldTypeString , alias: CAYENTA_LOC_REC_NO , length: 20 )
ROUTE_NO ( type: esriFieldTypeString , alias: Route No , length: 10 )
SEQ_NO ( type: esriFieldTypeString , alias: Sequence No , length: 10 )
CYCLE_NO ( type: esriFieldTypeString , alias: Cycle No , length: 10 )
JDE_WO_ID ( type: esriFieldTypeString , alias: JDE_WO_ID , length: 20 )
DATE_INSERVICE ( type: esriFieldTypeDate , alias: Date Inservice , length: 36 )
WIRE_COUNT ( type: esriFieldTypeInteger , alias: Wire Count )
SERVICE_STATUS ( type: esriFieldTypeString , alias: Service Status , length: 10 )
LOCATION_CLASS ( type: esriFieldTypeString , alias: Location Class , length: 10 )
LOCATION_SUBCLASS ( type: esriFieldTypeString , alias: Location Subclass , length: 10 )
METER_BILL_CODE ( type: esriFieldTypeString , alias: Meter Bill Code , length: 10 )
KW_DEMAND ( type: esriFieldTypeString , alias: KW Demand , length: 20 )
KWH_CONSUMED ( type: esriFieldTypeString , alias: KWH Consumed , length: 20 )
READ_DATE ( type: esriFieldTypeDate , alias: Read Date , length: 36 )
BILLING_CYCLE_DAYS ( type: esriFieldTypeString , alias: Billing Cycle Days , length: 10 )
CRITICAL_LOAD ( type: esriFieldTypeString , alias: Critical Load , length: 7 )
SPOT_LOAD ( type: esriFieldTypeString , alias: Spot Load , length: 5 , Coded Values:  ,  )
METER_TYPE ( type: esriFieldTypeString , alias: Meter Type , length: 15 )
METER_MULTIPLIER ( type: esriFieldTypeString , alias: Meter Multiplier , length: 5 )
TAX_DISTRICT ( type: esriFieldTypeString , alias: Tax District , length: 5 )
METER_COMMENTS ( type: esriFieldTypeString , alias: Meter Comments , length: 100 )
WORKREQUESTID ( type: esriFieldTypeString , alias: Work Request ID , length: 20 )
DESIGNID ( type: esriFieldTypeString , alias: Design ID , length: 20 )
WORKLOCATIONID ( type: esriFieldTypeString , alias: Work Location ID , length: 20 )
WORKFLOWSTATUS ( type: esriFieldTypeInteger , alias: Work Flow Status , Coded Values: [0: None] , [1: In Design] , [2: Pending Approval] , ...5 more... )
WORKFUNCTION ( type: esriFieldTypeInteger , alias: Work Function , Coded Values: [0: In-Service] , [1: Install] , [2: Remove] , ...5 more... )
HOUSE_NO ( type: esriFieldTypeString , alias: House Number , length: 18 )
STREET_PFX_DIR ( type: esriFieldTypeString , alias: Street Prefix Direction , length: 5 , Coded Values:  ,  , [NE: North East] , ...5 more... )
STREET_NM ( type: esriFieldTypeString , alias: Street Name , length: 40 )
STREET_NM_SFX ( type: esriFieldTypeString , alias: Street Name Suffix , length: 6 , Coded Values: [ALY: Alley] , [ANX: Annex] , [ARC: Arcade] , ...196 more... )
STREET_SFX_DIR ( type: esriFieldTypeString , alias: Street Suffix Direction , length: 5 , Coded Values:  ,  , [NE: North East] , ...5 more... )
SEC_ADDR_ID ( type: esriFieldTypeString , alias: Secondary Address (unit) , length: 5 , Coded Values: [APT: Apartment] , [BLDG: Building] , [BOX: Box] , ...12 more... )
SEC_ADDR_RANGE ( type: esriFieldTypeString , alias: Secondary Address Range , length: 18 )
SPECIAL_DIRECTIONS ( type: esriFieldTypeString , alias: Special Directions , length: 50 )
BAD_DOG ( type: esriFieldTypeString , alias: Bad Dog , length: 10 )
TECH_SERV_MULTIPLIER ( type: esriFieldTypeString , alias: Tech Services Multiplier , length: 10 )
FLEXNET_ID ( type: esriFieldTypeString , alias: FLEXNET_ID , length: 20 )
Relationships:
Service Location (0) -- Related To: De-Energized Service Locations (8)
Supported Operations:   Query   Query Related Records   Generate Renderer   Return Updates



0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jordan,

  In your attached REST Service directory text your fields are not listed with any xx.somefield but that is how you have them in the eSearchWidget.xml. That is where I would start looking.
0 Kudos