<expression alias="Project Railroads" textsearchlabel="Enter NAME or FEATURE_ID below"> <values> <value>1=1</value> </values> </expression>
public function labelCompareFunction1(obj1:Object, obj2:Object, column:GridColumn = null):int
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.
Matt, No that is not an option in the compiled version.
Rob,Is it possible to disable the results to only have them show in the FixedDG and leave the text search still showing? Not sure if this is something that can be done in the compiled version 3.07 or not.Thanks,Matt
showStateResults();
<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>
<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>
<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>
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_
<expressions> <expression alias="Property Parcels" textsearchlabel="Search by PRJTRACTNO AND OWNER"> <values> <value prompt="Enter Project Number">UPPER(PRJTRACTNO) LIKE UPPER('%[value]%')</value> <value prompt="Enter Owner"> AND UPPER(OWNER) LIKE UPPER('%[value]%')</value> </values> </expression> </expressions>
Thanks so much. I am trying to implement the search with the AND using two fields. <expressions> <expression alias="Property Parcels" textsearchlabel="Search by PRJTRACTNO AND OWNER"> <values> <value prompt="Enter Project Number">UPPER(PRJTRACTNO) LIKE UPPER(%'[value]'%)</value> <value prompt="Enter Owner"> AND UPPER(OWNER) LIKE UPPER(%'[value]'%)</value> </values> </expression> </expressions> However I got the error which is showinfg in the attached image Thanks Jorge
<expressions> <expression alias="Property Parcels" textsearchlabel="Search by PRJTRACTNO AND OWNER"> <values> <value prompt="Enter Project Number">PRJTRACTNO = [value]<value> <value prompt="Enter Owner"> AND UPPER(OWNER) LIKE UPPER(%'[value]'%)</value> </values> </expression> </expressions>
I would guess that your PRJTRACTNO is actualy a number field and not a text field. If so: <expressions> <expression alias="Property Parcels" textsearchlabel="Search by PRJTRACTNO AND OWNER"> <values> <value prompt="Enter Project Number">PRJTRACTNO = [value]<value> <value prompt="Enter Owner"> AND UPPER(OWNER) LIKE UPPER(%'[value]'%)</value> </values> </expression> </expressions> If I try to search a numeric field using text input, I get the same error that you posted. R_ Of course, as Robert pointed out, the double wildcards can/will match a LOT of values.
<links> <link includeinresults="true" alias="Lyon Co Assessor Parcel Search"> <![CDATA[http://www1.lyon-county.org:403/cgi-bin/asw101?Parcel={YPNO}]]> <icon><![CDATA[assets/images/i_table.png]]></icon> </link> </links>
<links> <link includeinresults="true" alias="Lyon Co Assessor Parcel Search"> <=!=[=C=D=A=T=A=[{YPNO}]=]=> <icon><=!=[=C=D=A=T=A=[assets/images/i_table.png]=]=></icon> </link> </links>
Jorge, As this widgets developer I would suggest that you pay close attention to my responses to your inquiry. In my last post I corrected some of the text in your expression. Go back to my last post and copy the expression as your had the order of the single qoutes and the percent symbol backwards.
if(curFormat){ var args2:Array = curFormat.split("|"); if(args2[0]){ currFormatter.currencySymbol = args2[0]; currFormatter.useCurrencySymbol = true; } if(args2[1]) currFormatter.fractionalDigits = args2[1]; if(args2[2]){ currFormatter.useGrouping = true; currFormatter.groupingSeparator = args2[2]; }else{ currFormatter.useGrouping = false; } if(args2[3]){ currFormatter.decimalSeparator = args2[3]; } value = currFormatter.format(value); }
Superficie: 9761.078281560
Superficie: 9761m2
The currencyformat attribute allows you to format a numeric field that represents currency values.
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.