Select to view content in your preferred language

Enhanced Search Dropdown list doesn't populate

1110
6
01-13-2014 07:00 AM
NinaRihn
Frequent Contributor
OK, I have looked at this and looked at this... can you tell me any reason that this dropdown list (eSearch 3.5) won't populate?..no errors, it just doesn't pull in any values.  it is a joined layer.   Here is the rest end point field description:

Layer: Building (ID: 0)
FACLIB.FAC$OWN.structure_existing_area.Location ( type: esriFieldTypeString , alias: Location , length: 50 )

Here is the expression:
<expression alias="Location" textsearchlabel="Search by Location">
   <values>
      <value prompt="Choose from dropdown list:" uniquevalsfromfield="FACLIB.FAC$OWN.structure_existing_area.Location" isvaluerequired="false" >upper(FACLIB.FAC$OWN.structure_existing_area.Location) LIKE upper('%[value]%')</value>
   </values>
</expression>

If I use a userlist, the list and search task work fine.    Is the dropdown list creation unable to process this "join layer" field name or something?  or could it be a limitation in the number of features from which it is able to process unique values?
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Nina,

   Hmm... I just tested the uniquevalsfromfield with a map service containing a join and it worked fine.

        <layer>
            <token />
            <definitionexpression></definitionexpression>
            <enableexport>true</enableexport>
            <enableprintgrid>true</enableprintgrid>
            <name>Unique Join Test</name>
            <url>http://gislap183:6080/arcgis/rest/services/ParcelTest/MapServer/1</url>
            <expressions>
                <expression alias="PPIN" textsearchlabel="Search by PPIN">
                    <values>
                        <value prompt="Example: 1998" uniquevalsfromfield="Parcels3.PPIN" isvaluerequired="true" autosubmit="false">Parcels3.PPIN = '[value]'</value>
                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select a Parcel</graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>Parcels3.NAME</titlefield>
            <fields all="false">
                <field name="Parcels3.PPIN"  gridfield="true" />
                <field name="Parcels3.PARCEL_NUMBER"  gridfield="true" />
                <field name="Parcels3.ADDRESS_1" gridfield="true" />
                <field name="Parcels3.TAX_DISTRICT"  gridfield="true" />
            </fields>
            <links/>
            <zoomscale usegeometry="true" zoompercent="1.6" />
            <autoopendatagrid>true</autoopendatagrid>
            <queryattachments>false</queryattachments>
        </layer>


One thing to note in your expression, if using uniquevalsfromfield then your actual SQL expression would not use LIKE (as you should already have exact matches in the list).

<expression alias="Location" textsearchlabel="Search by Location">
    <values>
        <value prompt="Choose from dropdown list:" uniquevalsfromfield="FACLIB.FAC$OWN.structure_existing_area.Location" isvaluerequired="false">FACLIB.FAC$OWN.structure_existing_area.Location = '[value]'</value>
    </values>
</expression>


This is not going to be the problem though.

I have never seen a join that uses a special character in the name FACLIB.FAC$OWN.structure_existing_area.Location. I wounder if this is an issue.

Do you see the widget display the unique value query progress?
[ATTACH=CONFIG]30462[/ATTACH]
0 Kudos
NinaRihn
Frequent Contributor
When I first open the widget, it says it is processing unique records for 0 of 252 , so it sees the correct number of records at least, but then the dropdown just doesn't get populated...   But then the next time I open the widget, it doesn't even try to process the unique records.   My references to FAC$OWN work in queries in my widgets.. I sure hope that $ is not the problem because that is sort of an agency convention, not my own!

  thanks....I will do some testing with it and see what I can work out...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nina,

   Can I see the whole layer tag for that layer?
0 Kudos
NinaRihn
Frequent Contributor
there's a token but I took it out.. the token works fine though.

<layer>
            <token></token>
            <definitionexpression></definitionexpression>
            <enableexport>true</enableexport>
            <enableprintgrid title="Buildings">false</enableprintgrid>
            <name>Building</name>
            <url>https://widmamaps.us/dma/rest/services/WIARNG_Facilities/Fac_RPI_WMAS_Cached_WithRPIJoins/MapServer/0</url>
   <expressions>
    <expression alias="Location" textsearchlabel="Search by Location">
     <values>
      <value prompt="Choose from dropdown list:" uniquevalsfromfield="FACLIB.FAC$OWN.structure_existing_area.Location" isvaluerequired="false" >upper(FACLIB.FAC$OWN.structure_existing_area.Location) LIKE upper('%[value]%')</value>
     </values>
    </expression> 
   </expressions>
   
            <graphicalsearchlabel>Use a shape to select buildings</graphicalsearchlabel>
            <spatialsearchlayer>false</spatialsearchlayer>
            <titlefield>Location</titlefield>
     <fields all="true" >
      <field name="FACLIB.FAC$OWN.structure_existing_area.Location" alias="Location" gridfield="true" /> 
      <field name="FACLIB.FAC$OWN.structure_existing_area.instln_id" alias="Site Number" gridfield="true" /> 
      <field name="FACLIB.FAC$OWN.structure_existing_area.facil_id" alias="Facility ID" gridfield="true" /> 
      <field name="FACLIB.FAC$OWN.structure_existing_area.structname" alias="GIS Name" gridfield="true" /> 
      <field name="FACLIB.FAC$OWN.PRIDE_RPI.PRIDEName" alias="PRIDE Name" gridfield="true" />
      <field name="FACLIB.FAC$OWN.PRIDE_RPI.TotalQty" alias="Building Total SF" numberformat="0|," gridfield="true"/>
      <field name="FACLIB.FAC$OWN.PRIDE_RPI.PlacedInServiceDate" alias="Acquisition Date" gridfield="true" /> 
      <field name="FACLIB.FAC$OWN.PRIDE_RPI.OrigCostToGov" alias="Acquisition Cost" currencyformat="$|0|," gridfield="true" />    
      <field name="FACLIB.FAC$OWN.PRIDE_RPI.OperationalStatus" alias="Operational Status" gridfield="true" />     
      <field name="FACLIB.FAC$OWN.PRIDE_RPI.DoDInterestType" alias="Interest Type" gridfield="true" />      
     </fields>     
           <links>
                <!--<link alias="View Traffic Photo" disablelinksifnull="true">
                    <![CDATA[{URL}]]>
                    <icon><![CDATA[assets/images/i_camera.png]]></icon>
                </link>-->
            </links>
            <zoomscale usegeometry="true" zoompercent="2"></zoomscale>
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
   <relates>
   <!--Area Records-->
    <relate id="0" label="Building Area Data" enableexport="true" icon="assets/images/WILOGO_small.png">
     <fields all="false" >
      <field name="AreaID" />
      <field name="Name" />
      <field name="AreaCatcode" />
      <field name="AreaQuantity" numberformat="0|,"/>
      <field name="AgreementSupptCode" />
      <field name="UsingOrg" />
      <field name="SustOrg" />      
      <field name="SustFund" />
         
     </fields>
                    <zoomscale usegeometry="false" zoompercent="1.6" />
    </relate>
   </relates>
            <symbology>
   
               <picturemarkersymbol url="assets/images/reddot.png" height="30" width="30" xoffset="0" yoffset="0" />
            </symbology>
   
   </layer>
0 Kudos
PaulMcCord2
Emerging Contributor

Hello,

I'm having this same issue with the dropdown list for the eSearch widget failing to populate, and I'm curious how the issue was resolved.

I'm using eSearch 2.6.1. The layer that the search is based on is hosted on ArcGIS for Server. This layer has around 3,500 features. I've configured the update search layer properties as follows:

Update Search Layer dialogue box

And my expression selects Unique municipality names:

Search expression.

As you can see, the tool appears to be working, meaning that it is processing the unique municipality name values. However, the list never populates and it never appears to read any values since it remains at '0 of 3568.'

One thing that is worth mentioning is that I originally hosted this layer on ArcGIS Online rather than Arc Server. When it was on AGOL, I was able to get the list to populate, which causes me some concern that the issue is how the Search URL to Arc Server is being interpreted. Could this be the issue?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Paul,

   You have posted this in the Old Flex Viewer space but you screen shots are from WAB eSearch. You should start a question in the https://community.esri.com/groups/web-app-builder-custom-widgets?sr=search&searchId=8c700fb1-f4d8-4a...‌ group.

0 Kudos