Filtering autocomplete box with sql where clause
Folks,
I'm not sure if this is possible using an autocomplete field. I'd normally create filtered list and input that into a combo box field, but there's too many values to present to the user, so we've been using the autocomplete. Problem is I need to filter out some values that the user can choose...
default is: UPPER(BURN_NAME) Like UPPER('%{0}%')
I need something like: UPPER(BURN_NAME) NOT LIKE '%DELETE%' AND UPPER(BURN_STATUS) <> 'NOMINATED' plus the '%{0}%' section somewhere in the mix...?
can this even be done?
I'm trying to avoid creating an extra dummy layer on the map service that is already configured to do the filtering and pass that into the form. That would seem the easiest solution, but ....
any help appreciated
thanks as always
GF
-
yes - i'm an idiot and should've done more testing.
this seems to be up and about.
UPPER(BURN_STATUS) <> 'NOMINATED' AND UPPER(BURN_NAME) NOT LIKE '%DELETE%' AND UPPER(BURN_NAME) LIKE '%{0}%'
filtering nicely!
sorry for the complete waste of time reading this post...
0 -
Hi Gareth,
I'm using the following in an autocomplete Where clause:
UPPER(LineCrossing.DESCRIPTION) Like UPPER('%{0}%') AND UPPER(EGPADMIN.LineCrossing.DESCRIPTION) Not Like '%ROAD% '
This excludes all roads from the search and works. So it is possible. I'm guessing you would just do something like:
UPPER(BRUN_NAME) Like UPPER('%{0}%') and UPPER(BRUN_NAME) not like '%DELETE%' and UPPER(BURN_STATUS) <> 'NOMINATED'
Have you tried this already and it's not working?
Cheers
Neil
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare