|
POST
|
It appears the where clause is parsed and applied client-side, and if it doesn't support functions like UPPER and LOWER, then it doesn't appear the SDK can natively do what you want. However, it is possible to apply this kind of filtering by adding your own functionality to add conditions for every combination. It's not pretty but it works, although I'm not sure what performance would be like as search values get longer and longer, since there would 2-to-the-power-of-x conditions where x is the number of characters in the input string. The following set of functions gets the job done: function addWordCombinations(word, index, partial, wordCombinations) {
if (index < word.length) {
addWordCombinations(word, index + 1, partial + word[index].toUpperCase(), wordCombinations);
addWordCombinations(word, index + 1, partial + word[index].toLowerCase(), wordCombinations);
} else
wordCombinations.push(partial);
}
function getWordCombinations(word) {
var wordCombinations = [];
if ((typeof word == "string") && (word.length !== 0))
addWordCombinations(word, 0, "", wordCombinations);
return wordCombinations;
}
function getCaseInsensitiveQueryConditions(fieldName, userValue) {
var wordCombinations = getWordCombinations(userValue);
if (wordCombinations.length === 0)
return "1=0"; //query with this where clause would return no records
else
return "(" + fieldName + " LIKE '%" + wordCombinations.join("%' OR " + fieldName + " LIKE '%") + "%')";
} With those in place, and assuming the user-specified search value was stored in a variable called "userValue" and the attribute field name was "name", you'd have something like: featureFilter.where = getCaseInsensitiveQueryConditions("name", userValue); Note: this implementation assumes the user-specified search value doesn't contain apostrophes (i.e. single quotes). Also, looking back after already typing up everything above, I notice you say you tried: (name LIKE UPPER('%hel%')) but have you tried: (LOWER(name) LIKE '%hel%') If that works it would be so much simpler...
... View more
2 weeks ago
|
1
|
1
|
95
|
|
POST
|
Glad to help out where possible. Note that it is possible to mark more than one post as a solution. It's up to you, but Joshua's post might qualify as well since he brought up the SQL methodology, which is the best way to handle case-sensitivity issues.
... View more
2 weeks ago
|
0
|
0
|
118
|
|
POST
|
Yes, extending what @JoshuaBixby has already said, if you had the user-specified value stored in a variable called "userValue", then you'd have something like this: layer.definitionExpression = "LOWER(DESCRIPTION) LIKE '%" + userValue.toLowerCase() + "%'"; You might also need to add some additional logic to accommodate for the user value containing an apostrophe (i..e. single quotation) mark as well.
... View more
3 weeks ago
|
0
|
0
|
136
|
|
POST
|
The JSON provided does not match the definition of a UniqueValueRenderer object, and therefore cannot be read. Instead, it provides the definition for a renderer of type "CIMUniqueValueRenderer" for which the SDK doesn't appear to have any support.
... View more
3 weeks ago
|
0
|
0
|
41
|
|
POST
|
I see...I thought you were using the widget, but you're actually using the map component. I'm afraid I don't presently have any further advice in that case.
... View more
3 weeks ago
|
0
|
0
|
69
|
|
POST
|
Yes, you can use the undocumented method "_zoomToClicked" to simulate a click on the "Zoom to" button: floorFilter._zomToClicked(); Note that because this is an undocumented feature, it may be changed or removed in a future version of the SDK without notice.
... View more
3 weeks ago
|
0
|
2
|
110
|
|
POST
|
You will likely get better results if you use the fromJSON method of the esri/renderers/support/jsonUtils module instead.
... View more
3 weeks ago
|
1
|
0
|
102
|
|
POST
|
I will answer #2 up front - yes, you can enable this for all layers in your application. In order to do so, add the following before loading the SDK (e.g. in your codepen, I added it between lines 8 and 9): <script type="text/javascript">
window.esriConfig = {
has: {
"featurelayer-advanced-symbols": true
}
};
</script> Moving to #3, no, there's no official documentation I know of for this, including even the ability to add these flags (see also this post). As a result, I can't answer #1 either. As for #4, the best I can offer is to try it out and see what happens...
... View more
3 weeks ago
|
2
|
2
|
148
|
|
POST
|
This statement is somewhat ambiguous: "I have updated the JSON definition of the layer to return a max record count of 5000". If that's something you've done on the client-side, I could see why it may not make a difference. Client-side queries will be constrained no matter what by the maximum allowed by the service being queried. For example, this layer used by one of the samples has a "Max Record Count" of 1000, and nothing can be done on the client-side to override that. If you have control of the service in question, and have configured the max to your liking, then it must be a different issue. If so, checking the Search component's maxResults property, or the LayerSearchSource object's maxResults property might be a good place to start.
... View more
4 weeks ago
|
0
|
1
|
87
|
|
POST
|
I've not done this with Portal, but I have with ArcGIS Server, and I suppose the differences would be marginal. Once published to either, I suspect that the piece on the client side would be pretty much the same as well: Create a PrintTemplate object set with the name of your layout in the layout property. Create a PrintParameters object with the template property set to the object created in step 1. Use the print module to execute a request using the object created in step 2.
... View more
4 weeks ago
|
0
|
0
|
52
|
|
POST
|
You might be looking for this: https://developers.arcgis.com/javascript/latest/references/map-components/ I suppose it would typically be arrived at by going to the ArcGIS Maps SDK for JavaScript documentation, clicking "References" near the top-right, and then clicking the Map Components tile.
... View more
4 weeks ago
|
2
|
0
|
312
|
|
POST
|
You said "I've tried [...] falsely associating the graphic with the target layer via its layer property", so I assume you have something like this: graphic.layer = layer; Perhaps try with this additional line: graphic.layer = layer;
graphic.sourceLayer = layer; Note that sourceLayer is an undocumented property, and could be changed or removed in a future release without notice, so use at your own risk.
... View more
a month ago
|
0
|
0
|
40
|
|
POST
|
As seen in the documentation, point objects don't have an extent (the value of their extent property is null). You might want to built a single MultiPoint object from the points returned by your query and zoom to it instead.
... View more
08-21-2025
05:40 PM
|
0
|
0
|
377
|
|
POST
|
The 4.27 AMD implementation is esri/widgets/Directions; the 4.33 documentation is here, and although doesn't mention the AMD syntax, AMD is supported in 4.27 and should still be largely (if not completely) the same (that is, the properties and methods documented in 4.33 probably haven't changed much since 4.27).
... View more
08-11-2025
04:29 PM
|
1
|
0
|
325
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 11-22-2022 04:50 PM | |
| 1 | 3 weeks ago | |
| 2 | 3 weeks ago | |
| 2 | 4 weeks ago |