Skip to main content

searching using 'LIKE' with no case sensitive using Query Task

Comments

10 comments

  • Permanently deleted user

    Hi Kim,

    1) you want to use SQL's UPPER function and convert both the attribute from the layer and the search value to uppercase so that you're comparing apples to apples. So your where clause would look like this :

    UPPER (Department) like  UPPER('%" + department +"%')"

    This change will avoid having to convert attributes in your MXD.

    2) Insert a "ConfigureWorkflowContainer" activity at the start of the workflow and set the "Workflow Container Name". Insert this name into the property into the DisplayForm activity. The region name property has become obsolete. See the "Search for Schools" example in the code gallery - http://support.geocortex.com/find-parcels-near-schools-workflow-from-html5-viewer-webinar

    3)  You want to set the "Feature Description" and not the long description for the results pane.

     

    regards,

    Edmond

    Latitude Support

     

    0
  • Permanently deleted user

     Thank you very much Edmond, I have implemented your solution and it's work for steps 1 & 2.  

     Step 3) Yes, I need to set  "Feature Description" in order to display details information on the results panel and only work if I used "Tool Identify" and selected the dot on the map, but didn't work on the results from workflow in step #1.  The results panel displays the results from the workflow (without the information that I have set in "Feature Description"),  when mouse over the data on the results panel, the "InfoBox" displays; however, the "Details' tab shows "None Available" and the "Attributes" tab shows all the attributes value from the layer. It's seem the results from workflow is not displayed the same information as I configure "Site" map. Do I have to write codes to handle the results from the workflow?

     Thanks,

     

     

    0
  • Permanently deleted user

    Hi Kim

    just a quick thought. What fields are you returning from any queries that occur in your workflow?

    Regards

    Ralph Price

    0
  • Permanently deleted user

    Hi Kim,

    Usually if the feature description and feature long description aren't showing up in the results when the features are selected using workflow, it means that the Select Features activity in your workflow is referencing the wrong map service and/or layer. Make sure that you are going to the Rest Endpoint for your Geocortex Site (found on the Site Info page in Rest Manager), choose Map, and check that you are using the map service id and layer id found in brackets beside the correct map service and layer..

    *Note that the attributes still show up correctly even if you aren't selecting the correct map service or layer ids because you are supplying these attributes in the feature set that was returned from your query.

    -Victoria

    0
  • Permanently deleted user

    I'm having a similar issue as Kim, but i'm positive my map IDs and layer IDs are correct.

     

    I'm getting the map ID from the REST site, and the layer ID from the geocortex site?
    0
  • Permanently deleted user

     Victoria, I took your suggestion and it works now. Details tab is display 'feature long description' and Attributes tab is display the 'Display Name' for the features return from workflow.

    Thank you very much.

    Kim

    0
  • Permanently deleted user

    Hi Victoria,

     

    I'm still having issues with this, is there another possible solution?

     

    Thanks.
    0
  • Patrick Kelleher

    Is there a way to convert the input string in an AutoComplete Box? For example, my user enters 'n' but the autocomplete does not return anything because my data is all upper case ('NIKE' 'NEIMAN MARCUS')

    0
  • Permanently deleted user

    Please use the technique detailed above to convert both your user input and database values to uppercase within the autocomplete WHERE clause. It should look something like this:

    UPPER (QueryField) like  UPPER('%{0}%')

    This will have the effect of creating a case insensitive autocomplete box.

    0
  • Carmen Durham

    Thank you Jonathan.

    We discovered this issue when switching from using an ArcGIS Rest Services that hit an SDE database to using a REST Service using a file geodatabase in a workflow (but same data). 

    With the SDE database, you didn't have to use UPPER with the Like statement (try it on the REST service you will see).  For example ST_LABEL Like 'mai%' would return anything starting with mai whether or not the data in the table is upper or lower case.

    But, if the file geodatabase is all uppercase, the above query will not return anything. 

    By the way - all the query tasks had to be adjusted also as they wouldn't work the same!  crazy!

    Carmen

    0

Please sign in to leave a comment.