Select to view content in your preferred language

Enhanced Search Widget for FlexViewer 2.1

108717
767
10-25-2010 02:13 PM
RobertScheitlin__GISP
MVP Emeritus
All Here is my next widget in the FlexViewer 2.1 series

Special thanks to Erwan Caradec for contributing to this code.

The Enhanced Search Widget extends the standard search widget with a floating data grid and a new spatial query w/buffering.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e
Tags (2)
0 Kudos
767 Replies
MLowry
by
Frequent Contributor
This thread should be closed, so when Robert provides his gracious technical support for all of this widgets, he gets the credit for answering the questions. I'm still surprised Esri hasn't brough Robert on-board to the API/development team yet.
0 Kudos
ChristopherBlinn1
Deactivated User
Robert,

I have most of my autocomplete functionality working but it appears I have overlooked something which is causing an issue.  Whenever the search button on the textInput state is hit, the popups for the results no longer load, or at least do not get the configured data loaded into them.  I am attaching a screen shot of this and also the SearchWidget.mxml with the autocomplete code inside (there's a comment to show you the autocomplete code).  If you get some time and want to take a look I'd appreciate it.  In the mean time, I am going to see if I can pinpoint what event is not firing or what is causing the issue.

Thanks,
Chris
0 Kudos
glennhazelton
Deactivated User
hi Robert,
i am having an issue with displaying a data field. it is coming from Oracle.
in the listing window i can see the date just fine as well as in the popup over the feature.
however in the datagrid the date is show in its raw state.
is there a format tag or something i can use to fix this?
thanks.
i love this tool.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Glen,

   Yes you need to set the dateformat and probably the useutc.

<field name="SALE_DATE" gridfield="true" dateformat="MM/DD/YYYY" useutc="true"/>
0 Kudos
glennhazelton
Deactivated User
thanks Robert, the formatting is working.
now i would like to be able to select by date range.
i have seen your note about this but i can't make it work.
i have tryed a few different ways to type in the date but nothing seems to return any records.
here is what i have tryed. i am working against arcSDE in Oracle if the makes a difference.

<expression alias="Open SQL" textsearchlabel="Search by Typing Full SQL example:[ DATE_TIME_COLLECTED &gt;= '1/3/2012 00:00:00 AM' AND DATE_TIME_COLLECTED &lt;= '2/1/2012 00:00:00 AM' ]...">[value]</expression>

Glen,

   Yes you need to set the dateformat and probably the useutc.

<field name="SALE_DATE" gridfield="true" dateformat="MM/DD/YYYY" useutc="true"/>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Glen,

   The easiest way to figure it out is to go to ArcMap and use the Select by attribute query and use the Get Unique Values button to determine the exact format of the date expected.

I believe it should look more like this though (I use SQL Server)
DATE_TIME_COLLECTED &gt;= '2012-3-1 00:00:00' AND DATE_TIME_COLLECTED &lt;= '2012-2-1 00:00:00'


Don't forget to click the top arrow (promote) as shown below on all the posts that have helped:
0 Kudos
Jon-PaulMcCool1
Emerging Contributor
First thank you so much for developing this widget! It works amazingly and your continued development is outstanding!

I wanted to know if the following would be possible. I want to be able to only have a layer show up in certain search options (specifically graphic and spatial). I am making an application for archaeology and I want to be able to select roads with graphics or their proximity to sites, but there is no unique attribute about them that makes them searchable via text. I was hoping to just remove this layer from the text search option while having it in the other two.

I hope that is isn't a duplicate question!

Jon-Paul
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jon-Paul,

   Currently there is no way to do that but it will be added to the list of enhancements considered for the next release.
0 Kudos
glennhazelton
Deactivated User
again, thanks for helping.
i did as you suggested and used arcmap . i took what i found and build a query to return values with a date less than XXX. it is below.
the good news is that it works if i enter a time values like this: 2012-02-02 00:00:00 into the entry box.

<expression alias="DATE" textsearchlabel="Search WWQ by Date Value LessThan or Equal to 2012-02-02 00:00:00" field="DATE_TIME_COLLECTED"  usedomain="false"> (DATE_TIME_COLLECTED) &lt;= TO_DATE('[value]','YYYY-MM-DD HH24:MI:SS')</expression>

however i still can't get the full SQL that will return records between dates to work.
likely it has to do with () or ' ' marks. here is what i put in as code and below that what i attempted to enter into the entry box.
any ideas appreciated.

<expression alias="Open SQL" textsearchlabel="Search by Typing Full SQL example:[ (DATE_TIME_COLLECTED) &lt;= TO_DATE('2012-02-30 00:00:00','YYYY-MM-DD HH24:MI:SS') AND (DATE_TIME_COLLECTED) &gt;= TO_DATE('2012-01-25 00:00:00','YYYY-MM-DD HH24:MI:SS') ]...">[value]</expression>

(DATE_TIME_COLLECTED) &lt;= TO_DATE('2012-02-30 00:00:00','YYYY-MM-DD HH24:MI:SS') AND (DATE_TIME_COLLECTED) &gt;= TO_DATE('2012-01-25 00:00:00','YYYY-MM-DD HH24:MI:SS')





Glen,

   The easiest way to figure it out is to go to ArcMap and use the Select by attribute query and use the Get Unique Values button to determine the exact format of the date expected.

I believe it should look more like this though (I use SQL Server)
DATE_TIME_COLLECTED &gt;= '2012-3-1 00:00:00' AND DATE_TIME_COLLECTED &lt;= '2012-2-1 00:00:00'


Don't forget to click the top arrow (promote) as shown below on all the posts that have helped:
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Glen,

   If you don't do a date range can you get a single date to work?
0 Kudos