Enhanced-Search-Widget-for-FlexViewer Part III

116326
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
JasonSmith6
New Contributor III
Hi Robert,

Does your eSearch Widget allow you to perform a search on a related table? For instance, I have a feature layer called "sites" that shows the geographic location of air monitoring sites. This layer has a 1-M relationship to a table called "parameter_info". Which means for each site, you could have 1 or more parameter detectors attached (think of a cell tower with multiple antennas owned by different operators).

What I want to be able to do is perform a search for a particular parameter, so that in the results it shows all sites that house that detector. Does that make sense?

Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jason,

  Searching standalone tables and/or retrieving related feature for a search are both supported and well documented. All you need to do is read the pdfs and/or the readme.txt
0 Kudos
JasonSmith6
New Contributor III
Robert,

I am reading the PDFs and definitely understand how your tool supports the linkage to a related table based on querying a feature layer. What I am wondering is if you just want to run a stand alone query on a Related Table, do you put the REST end point for that table within the url element under the <layer> tag, instead of a feature layer?

Thanks,
Jason
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jason,

   If you are wanting to query a flat/Standalone table then you add it as a table not a layer. There are examples of querying a table in the eSearchWidget.xml and info covering this in the pdf.
0 Kudos
ThomasBrophy
New Contributor III
Robert,
Thank you for responding so quickly. I really appreciate it.

Yes, I am running ArcGIS 10 Server Advanced Enterprise SP5 (10.05) but I cannot set up an �??http traffic inspector/analyzer�?� because it's on a SECRET network. Any ideas what would cause the different results of the same code?

I looked at the IIS logs at the time I opened and clicked the pulldown that did not work, (This may help???)
This is a hand jam, so let me know if you need more.
�?�GET/ArcGIS/rest/services/hsip/mapserver/5/query returnGeometry=false&test=%&f=json&returnIdsOnly=true &spatialRel=esriSpatialRelIntersects 443 �?? 22.50.xx.xxx Mozilla/4.0+(compatable;+MSIE+7  .   .   .   .   .   .   .   /bin-debug/index.swf  200  0  0  479


Thanks again Robert.


Robert,
I tried your 3.3.3, but the pulldown is still not populating.  I was able to extract the ArcGIS Server logs for the process in question on both servers. 

First, here is the one that works:
<Msg time='2013-06-10T13:36:31' type='INFO3' code='4006' target='hs_wm.MapServer' machine='xxxxxx' user='UNET\brophyt' thread='7440' elapsed='0.03100'>Server Context created.</Msg>
<Msg time='2013-06-10T13:36:31' type='INFO2' code='100001' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='xxxxxx' user='UNET\brophyt' process='8364' thread='2536'>String request received. Request size is 173151 characters.</Msg>
<Msg time='2013-06-10T13:36:31' type='INFO2' code='10106' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='xxxxxx' user='UNET\brophyt' process='8364' thread='2536'>QueryData has started.</Msg>
<Msg time='2013-06-10T13:36:36' type='INFO3' code='10107' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='xxxxxx' user='UNET\brophyt' process='8364' thread='2536' elapsed='4.38601'>QueryData has completed.</Msg>
<Msg time='2013-06-10T13:36:36' type='INFO2' code='100002' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='xxxxxx' user='UNET\brophyt' process='8364' thread='2536' elapsed='4.39902'>String request succesfully processed. Response size is 45108 characters.</Msg>
<Msg time='2013-06-10T13:36:36' type='INFO3' code='4007' target='hs_wm.MapServer' machine='xxxxxx' user='UNET\brophyt' thread='4220' elapsed='4.43000'>Server Context released.</Msg>


Here is the one that fails to populate. 
<Msg time='2013-06-10T13:36:31' type='INFO3' code='4006' target='hs_wm.MapServer' machine='yyyyyy' user='?' thread='120460' elapsed='0.01600'>Server Context created.</Msg>
<Msg time='2013-06-10T13:36:31' type='INFO2' code='100001' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='yyyyyy' user='?' process='121360' thread='121304'>String request received. Request size is 173151 characters.</Msg>
<Msg time='2013-06-10T13:36:31' type='INFO2' code='10106' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='yyyyyy' user='?' process='121360' thread='121304'>QueryData has started.</Msg> 
<Msg time='2013-06-10T13:36:31' type='ERROR' code='10837' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='yyyyyy' user='?' process='121360' thread='121304'>Geodatabase error: Logfile not found.</Msg>
<Msg time='2013-06-10T13:36:31' type='ERROR' code='10837' target='hs_wm.MapServer' methodName='MapServer.QueryFeatureData' machine='yyyyyy' user='?' process='121360' thread='121304'>Genaral GeoDatabase Error.</Msg>
<Msg time='2013-06-10T13:36:36' type='INFO3' code='10107' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='yyyyyy' user='?' process='121360' thread='121304' elapsed='0.22043'>QueryData has completed.</Msg>
<Msg time='2013-06-10T13:36:31' type='ERROR' code='100005' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='yyyyyy' user='?' process='121360' thread='121304' elapsed='0.23043'>Method failed.HRESULT = 0x80041530 : This is a FACILITY_ITF error that is specific to the interface that returned the error. See documentation of the interface that returned this error for information about this HRESULT.</Msg>
<Msg time='2013-06-10T13:36:36' type='DEBUG' code='100000' target='hs_wm.MapServer' methodName='MapServer.QueryData' machine='yyyyyy' user='?' process='121360' thread='121304'>ERROR INFO = Error processing server request.</Msg>
<Msg time='2013-06-10T13:36:36' type='INFO3' code='4007' target='hs_wm.MapServer' machine='yyyyyy' user='?' thread='118788' elapsed='0.28000'>Server Context released.</Msg>


Do you know what, "Geodatabase error: Logfile not found." on line 4 is about?  Do you know where this log file is located?  Could this be a permissions issue?  I am running out of ideas.

//
I almost forgot.  The first set of logs are from our UNCLAS server, querying hs_wm mapservice who's data resides in ArcSDE on another ORACLE box - it works fine.
The second set of logs are from our CLASS server, querying the same hs_wm mapservice who's data resides in ArcSDE on another ORACLE box - it does not work.  The interesting thing I found out through testing -->  If I export the data being queried into a FGB local to ArcGIS Server - The dropdown works fine.
//

Thanks for your help.
0 Kudos
AndreaGrygo
New Contributor
Robert, I am updating the FV for the Construction viewer you helped me out with a few years ago (gis.stlouiscountymn.gov/PWviewer).  I'm at FV 3.1 and eSearch 3.1.13.

A brilliant co-worker modified the PopUpRendererSkin.mxml with the following if/else statement for the popups, which results in two hyperlinks as shown

if (fieldInfo.label == " ")
{
     label = new Label();
     htmlText = '<a href="' + htmlText + '" target="_blank">' + "<b>Click to view past updates" + "</b></a>";
}
          
    else if (fieldInfo.label == "  ")
       
{
    label = new Label();
    htmlText = "<a href='http://gis.stlouiscountymn.gov/PW/WebForm1.aspx?FirstName=" + FlexGlobals.topLevelApplication.firstName + "&LastName=" + FlexGlobals.topLevelApplication.lastName + "&email=" + FlexGlobals.topLevelApplication.email + "&ConstId=" + htmlText + "'target='_blank'><b>Click to subscribe to updates</b></a>";
} 
          
   
else
{
 label = new Label();
}



[ATTACH=CONFIG]25232[/ATTACH]

I'm having a heck of a time trying to duplicate this for the eSearch... if I use code as follows in the eSearch.xml the entire URL shows in the popup for the 1st link and the project number is all that shows for the 2nd link  Neither hyperlink.  I saw that you are using PopUpRendererSkin.mxml from the API so I do not have a separate popup file in the eSearch folder as before. 
<field name="NEWS_RPT" alias=" " hyperlinkgridfield="true" hyperlinkaliastext="Click to view project history" />
<field name="PROJNUM" alias="  " hyperlinkgridfield="true" hyperlinkaliastext="Click to subscribe to updates"/> 


I'm sorry if I'm missing something very obvious here, and appreciate any help you can provide.
Andrea
0 Kudos
HenryUnderwood
New Contributor II
Hello Everyone,

Robert, thank you for your efforts.

I have a simple question for someone more familiar with the syntax of the configuration file. Is it possible to search a value against a string made from a number of fields (PARADRNO + PARADRSTR)?

This is my pseudo code:

<value prompt="ADDRESS (e.g. 3 Washington St)" isvaluerequired="false">(PARADRNO + upper(PARADRSTR)) LIKE upper('%[value]%')</value>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Henry,

   No you can not do a query that way as the actual SQL statement that has to go to the server would have to know the value it is looking for in the PARADRNO and the PARADRSTR separately.

It would have to look like this:

<value prompt="ADDRESS Number (e.g. 300)"  isvaluerequired="false">(PARADRNO) LIKE [value]%</value>
<value prompt="ADDRESS Street (e.g. Washington St)"  isvaluerequired="false" operator="and">(upper(PARADRSTR)) LIKE  upper('%[value]%')</value>


Obviously this is not going to look good in the UI as you will have two different fields one for the house number and one for the street, but that is how it is based on the fact you have the house number and street name in separate fields.
0 Kudos
MichaelVolz
Esteemed Contributor
Henry:

Can you add a new field to your layer's datasource that has this information already concatenated so you can use Robert's eSearch widget with one field so it is not so awkward for the enduser?
0 Kudos
BoCastillo
New Contributor
I must be missing something on the "enable multiple selection" with graphics, as I can't get it to work. Mulitple selection using the buffer tool works but not with the graphics. I have the following set to "true" in the XML.

<enablemultigraphicssearch>true</enablemultigraphicssearch>
<multipartgraphicsearch>true</multipartgraphicsearch>


So I don't know what's going on.
0 Kudos