Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part II

101422
552
04-19-2012 08:03 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I am pleased to announce the next release of my eSearch Widget.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e

Version 2.5.1.7 - 4/19/2012
* Added ability to search (flat/standalone/no geometry) tables.
* This time all Zooming uses the same scaling (popup, datagrid, widget results, zoom to all).
* Added Relates icon/button to datagrids so that you can click on it in the datagrid to
  open relates choice dialog.
* Move all skins to a skins package for cleaner organization.
* Links that are not associated with a field now work.
* Ability to disable the relates tab in the fixed widget is now configurable.
552 Replies
RobertScheitlin__GISP
MVP Emeritus
Bob,

   Your SQL expression would still be one value:

"PLOT IN ('[value]')" 
Notice the location of the single quotes

Then you URL need to look like this:

esearch=7SFG','I-27 notice the single quotes surrounding the comma. The reason for this is easy to understand if you grasp the concept the the widget find and replaces [value] with the contents of the esearch variable in the url so your actual SQL that will get used would look like this when it it done replacing:
PLOT IN ('7SFG','I-27') 
Because you searching strings each value in your IN clause has to be wrapped in single quotes.
0 Kudos
Hwa_SaupLee
New Contributor III
Can it be possible to use UniqueValueRenderer for symbology?
I tried to modify the symbology tag but no luck.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hwa Saup Lee,

  No that is not currently supported.
0 Kudos
BobSolley
New Contributor
Robert, thanks for the quick reply to earlier post.
I'm still having problems getting the multiple values to pass to the Esearch widget.

Changed my SQL expression to a single value
test.PLOT IN ('[value]')

(is there something I might be missing in the <expressions tag>?)

and passing the URL string
esearch=7SFG','I-27


But no luck, I get a Error in search widget:
[RPC Fault faultstring="Unable to complete operation" faultcode="400" etc....

I can see the value's passed to the esearch text box 7SFG','I-27
I can also pass in just one value and it works fine.

If you have any code samples for this type of SQL function, that might help find what I'm missing.

thx bob
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bob,

   OK I see an issue after testing this where I have code in this widget that handles escaping single quotes for entries like o'leary by changing o'leary to o''leary. The issue is when you are attempting to use value1','value2 it is getting changed to value1'','value2 and the SQL is malformed. I will work on a fix for this. I guess you are the first to want to do an IN SQL expression. :confused:
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bob,

   You can help me with some development direction based on this... Are you going to instruct your users to single quote and comma seperate the values? How did you intend to use this?
0 Kudos
MichelleKinseth
New Contributor II
Hi Robert - I'm back with something that could be a bug (?)... I can't tell if it's a widget problem or an issue with my code edits (or maybe it's neither and this is normal behavior?).

My viewer uses the URL search parameter when it launches and thus opens with a specific feature selected/searched and the related results shown in the table. That all works great. The problem is when the user tries to conduct a new search.

If the user DOES NOT clear the initial search and attempts to search a different feature on the map using one of the graphical search tools (the only search method active in my viewer), the viewer simply "unsearches" the original (URL) search result but does NOT perform a search on the new feature of interest. This behavior persists in the viewer until the user actually hits CLEAR SEARCH in the widget gui, clearing the URL search. After that, the user can search any feature anywhere on the map and it'll highlight and show the related records; no matter if another feature is selected or not.

Let me know if this is unclear - thanks for any help or insight you can provide, if any is required...

thanks,
~Michelle
0 Kudos
RhettZufelt
MVP Notable Contributor
Michelle,

Robert's example page does the URL query ( http://gis.calhouncounty.org/FlexViewer3.1/index.html?config=config-eSearch.xml&esearch=2&slayer=3&e... ).

I tried to reproduce what you are saying on the demo site, but can't seem to reproduce it.  Are you running the latest version?

Anyway, might see if you can make the same thing happen on the demo site.

Might give you an idea if it is the way it behaves, or due to some of your edits.

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Michelle,

   I have attempted to reproduce your issue (I even disabled text,spatial buttons) and as Rhett said I don't see what you are reporting. I do suggest as Rhett did, that you check that you are using the latest version.
0 Kudos
MichelleKinseth
New Contributor II
Thanks Robert and Rhett - it appears what I'm seeing is likely an issue with my code edits/changes (my boss had a lot of customization requests...). I'll do some troubleshooting today. I appreciate the replies!
~Michelle

oh - and I am running the newest version... 3.1.8, right?
0 Kudos