|
POST
|
do you mean something like the search centerline example from the example site (though it actually has three value statements) http://gis.calhouncounty.org/FlexViewer3.0/index.html?config=config-eSearch.xml&search=2&slayer=3&exprnum=1 ? If so, here is the snippet from the eSearchWidget.xml Robert has supplied with the widget that does that. <definitionexpression></definitionexpression>
<enableexport>true</enableexport>
<name>Road Centerlines</name>
<url>http://gislap134/ArcGIS/rest/services/Highway/MapServer/5</url>
<expressions>
<expression alias="Road Name and Zip" textsearchlabel="Search by Road Name and Left Zipcode and Right Zip:">
<values>
<value prompt="Exmaple: ANDREW">RD_NAME = '[value]'</value>
<value prompt="Exmaple: 36201"> AND ZIP_L = [value]</value>
<value prompt="Exmaple: 36201"> AND ZIP_R = [value]</value>
</values>
</expression>
</expressions> (I deleted the other expressions that didn't seem to apply) (Don't forget the space before the AND as it is not in the example.xml this way) Can also use OR instead if that is what you need. Is this what you are after? Below is a snippet that I am using. It puts two options on the search widget, one lets you put in partial and does a LIKE operation, the other only finds exact matches. But, they are both searching the same layer, same field. <expression alias="SiteCode" textsearchlabel="Search by SiteCode: (enter search text in one box only)">
<values>
<value prompt="Search for Matches: Example: 100-D-" field="SITECODE">UPPER(SITECODE) LIKE UPPER('%[value]%')</value>
</values>
<values>
<value prompt="Search EXACT SiteCode" field="SITECODE">UPPER(SITECODE) = UPPER('[value]')</value>
</values>
</expression> <expression alias="SiteCode" textsearchlabel="Search by SiteCode: (enter search text in one box only)">
<values>
<value prompt="Search for Matches: Example: 100-D-" field="SITECODE">UPPER(SITECODE) LIKE UPPER('%[value]%')</value>
</values>
<values>
<value prompt="Search EXACT SiteCode" field="SITECODE"> OR UPPER(SITECODE) = UPPER('[value]')</value>
</values>
</expression> In the first example, multiple fields are searched, in the second example, you choose which input to use and it searches the same fields but with different expression. The third is similar to the second but will take inputs from both text box's, and if either match, you get the results. Just remember, if you use an AND or OR statement, the first text box MUST have a value in it. If I understand you correctly, below is what you need.
<expression alias="Tract" textsearchlabel="Search by Tract Number:
<values>
<value prompt="Select All Records" userlist="Select All Records" field="PRJTRACTNO">1=1</value>
</values>
<values>
<value prompt="Search Tract Number" field="PRJTRACTNO">UPPER(PRJTRACTNO) LIKE UPPER(%'[value]'%)</value>
</values>
</expression> R_
... View more
08-30-2012
04:02 PM
|
0
|
0
|
2636
|
|
POST
|
Hi Drew, I see you added the DMS option for output. Was wondering if there is a coordinate system tag for the xml to accept DMS as input? <coordinateSystem name="GCS WGS 1984 (Decimal Degrees)"
wkid="4326" decimals="9" /> I want the same system as above, just would prefer to be able to enter in the DMS as well (otherwise, I always have to convert to DDD first. easy for me, but the "users" have a fit ) 😉 Thanks again, R_
... View more
08-30-2012
12:25 PM
|
0
|
0
|
3235
|
|
POST
|
Robert, I wondered if the all="true" had something to do with it, so I tested as much as I could with that (with services that have and do not have a date field). Could not make it give me that error using FGDB FC with server 10.0 and using the uncompiled version. Not sure if this only happens in app builder or not as I do not use app builder myself. In case this might help you "fix" it, R_
... View more
08-30-2012
12:11 PM
|
0
|
0
|
1223
|
|
POST
|
Well, not sure what else I can do to help as I avoid SDE like the plague and am only running server 10.0 so can't really test much. If the new column doesn't work, if it were me, I'd export the data to a FGDB feature class, make a new service from that, then try to search again. Would also try to search other fields in the same service. Sometimes it is easier to try to find something that does work, then try to figure it from there (or just move on ) 🙂 R_
... View more
08-30-2012
07:41 AM
|
0
|
0
|
1223
|
|
POST
|
What is the base data format? FGBD, PGDB, shapefile? Also, have you tried making a new field and calculating it from the FACILITYID field and tried the search on that? [NEWFIELD] = Ltrim(Rtrim(FACILITYID)) <value prompt="Example:100">NEWFIELD = '[value]'</value> In the past I have resolved some issues this way. Never found the problem, but "fixed" it. R_
... View more
08-29-2012
03:31 PM
|
0
|
0
|
1422
|
|
POST
|
What happens if you try this? <value prompt="Example:100">UPPER(FACILITYID) LIKE UPPER('%[value]%')</value> I know this isn't what you are after, but if this gets results, there are some hidden spaces/characters in your attributes. I've had issues like that before, then a LTrim(),RTrim() on the attribute column fixed it up. Just a thought, R_
... View more
08-29-2012
01:23 PM
|
0
|
0
|
1422
|
|
POST
|
If you follow the directions in the readme file, the autocompletesearch seems to work just fine in 3.0 final. You get a bunch of "no type declaration" warnings in the Flashcommander as component, but it doesn't seem to affect it as it works just fine. R_
... View more
08-29-2012
11:09 AM
|
0
|
0
|
2022
|
|
POST
|
You should be able to put both in the basemaps section, I have done this successfully several times. You just need to make sure that YOUR basemap is loaded first as tiled (which sets the wkid and LODs) (unless you override the wkid in the map tag). and then load the ESRI map as dynamic <basemaps>
<layer label="Oil Map" type="tiled" visible="true" alpha="1"
url="http://myserver.mydomain.ca/ArcGIS/rest/services/myservice/MapServer" />
<layer label="World Map" type="dynamic" visible="false" alpha="1"
url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" />
</basemaps>
This works fine for me (well, with my basemap instead of yours ). Just have to "wait" for the world map, especially the first time you load/zoom. R_
... View more
08-29-2012
08:18 AM
|
0
|
0
|
1036
|
|
POST
|
Hello, I posted a question similar to this in the Flex API forum yesterday. I am attempting to perform a SQL query for a TEXT field that is in our Valves feature class. The field is an ID number field but also contains letters. I'd like the user to have the ability to type in a valve number and successfully select it. Here is what I have so far: <values> <value prompt="Example:100"> FACILITYID = '[value]'</value> </values> EDIT: I'd like to point out that FACILITID = '[value]' yields results in the default Search widget in the Flex Viewer. are you sure you have the item spelled correctly? In your two examples, one that works, one that doesn't, you have different spelling. not sure if that is just a typo in the email or in your expression as well. R_
... View more
08-28-2012
12:18 PM
|
0
|
0
|
1229
|
|
POST
|
Gabriel, Bug with the label being ignored is fixed for next release (thanks for reporting this). I will add this as an enhancement request. Currently there are checks made to ensure all fields are filled before executing the search. The draw back to this being changed is that the search will no longer be able to be triggered by pressing the enter key as I will not know if the user pressed enter unintentionally or not. Hi Robert, Been trying to figure out where/how you removed the ability to trigger search by pressing enter. Would that be something pretty simple for me to add back in? In my "particular" case, it is prefered. Thanks again, R_
... View more
08-28-2012
11:57 AM
|
0
|
0
|
2194
|
|
POST
|
Not sure, but I think the newest version of eSearch widget will let you do what you want and more. http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e R_
... View more
08-27-2012
04:42 PM
|
0
|
0
|
473
|
|
POST
|
Thanks again Robert. I figured it was to assign an ID, but then your adds to the other mxml were referencing by name. I see now where they are iterating by id's and why they are needed. R_
... View more
08-27-2012
11:57 AM
|
0
|
0
|
659
|
|
POST
|
Thanks again Robert, is working for the most part, but also created some strange behaviour. If I open the SwipeSpotlight widget before I drag/drop any mapservices they will show up in the swipable list. If I drag/drop mapservices and THEN open the SwipeSpotlight, they do not show. It only captures the services added when the SwipeSpotlight widget is "open". Also, I noticed that if I have the dynamic legend widget open and drag/drop "layer1" onto the map, it does not show on the legend. However, if I then drop "layer2" on the map, then layer1 will display on the legend so there seems to be a slight delay (the TOC widget show the change immediately). Not that I mind the "delay" here, just thought it might give you a better idea of what is going on. However, if I so much as touch ANYother widget (legend, TOC, print, bookmark, etc.) I can then never drag/drop again without a complete refresh of the map. If I try, it always gives me the little red X so it seems to "disable" the mapservices widget on widget change. R_ also, trying to figure out the code you sent, what is the purpose of the = dLayer.id change to mapservices? I.e., how does that tie in with the swipespotlight.mxml changes? It seems as if you are setting another variable name, but not sure what the reference to it is in the other mxml.
... View more
08-27-2012
09:58 AM
|
0
|
0
|
659
|
|
POST
|
I am using the swipespotlight widget as well as the add map services widget. Everything is working, however, once the map is loaded and I add services by drag/drop from the mapservices widget the "new" layers are not available to the swipe widget. Is it possible to get the swipe/spotlight widget to actually list the layers currently loaded, or are we stuck getting this list from the original config.xml? Thanks again, R_
... View more
08-23-2012
02:44 PM
|
0
|
4
|
2154
|
|
POST
|
<layer> <definitionexpression></definitionexpression> <enableexport>true</enableexport> <name>Cincinnati Storm Sewers</name> <url>http://gisserver-10:6080/arcgis/rest/services/MSD/SearchFeature/MapServer/3</url> <expressions> <expression alias="Segment ID" textsearchlabel="Search by partial of Segment ID.[ Example:337012003 ]:">SEG_ID LIKE '%[value]% '</expression> </expressions> <graphicalsearchlabel>Use one of the graphical search tools to select Cincinnati Storm Sewers</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <titlefield>SEG_ID</titlefield> Please help me to figure it out what's wrong here. Thanks Amy If this is a numeric field as your "Example text" states, you need to remove the single quotes as this passes it as a text expression. Also, do not believe LIKE works with numeric fields anyway. might try: <expression alias="Segment ID" textsearchlabel="Search by partial of Segment ID.[ Example:337012003 ]:">SEG_ID = [value]</expression>
R_
... View more
08-23-2012
10:39 AM
|
0
|
0
|
474
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Thursday | |
| 1 | 2 weeks ago | |
| 1 | 04-02-2026 09:50 AM | |
| 1 | 04-01-2026 01:21 PM | |
| 1 | 10-08-2025 11:59 AM |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|