Thanks Doug and Greg.

I will check this and update you.

Regards,
Vishal

On Thu, Nov 8, 2012 at 2:16 PM, Givens, Gregory CTR NPC, Pers 54 <
[email protected]> wrote:

> Vishal,
>
> Doug is correct
> 'field' LIKE "%[^a-z A-Z0-9]%" will allow users to search for a string
> with a space character.
>
> You are restricting a lot more than just wildcards
> If your intent is to only allow ALPHA NUMERIC (and spaces) in your
> searches then that will do it.
> Keep in mind though, you're blocking searches on commonly used special
> characters like  @':.,#-
> Searches for "Its" won't find "It's" and ' isn't one of your allowed
> characters.
>
>
> Greg Givens (Contractor)
> Network Applications Support
> Navy Personnel Command
>
>
>
>
> -----Original Message-----
>  From: Action Request System discussion list(ARSList) [mailto:
> [email protected]] On Behalf Of Mueller, Doug
> Sent: Thursday, November 08, 2012 11:05 AM
> To: [email protected]
> Subject: Re: How to restrict wild card searches
>
> **
>
> Vishal,
>
>
>
> I am curious why you use the syntax you are using
>
>
>
> 'field' LIKE "%[^a-zA-Z0-9]%"
>
>
>
> This will error on space or any special character or any number of other
> conditions.
>
>
>
> If you want to just disallow wildcards, there are only a couple of them.
>  I assume the things you are
>
> worried is really the % character.
>
>
>
> Why not
>
>
>
> 'field' LIKE "%[%]%"
>
>
>
> Note that the % sign should not be a wildcard as it is within the []
> construct which says to treat things
>
> inside it as characters.
>
>
>
> This says to match when there is a % in the value.
>
>
>
> Now, you could add other specific characters as well within the test if
> you cared to (like match any single
>
> character or even the [ in case someone wanted to try a set of characters]
> but is that really necessary?  Isn't
>
> it just the % that is the issue?
>
>
>
>
>
> Now, if you wanted to keep what you have and just allow space in addition,
> just add a space in the set of
>
> characters.
>
>
>
> 'field' LIKE "%[^a-z A-Z0-9]%"
>
>
>
> Notice that I put a space between the a-z and A-Z.  That should include
> space as a character in your set of
>
> characters.
>
>
>
>
>
> NOTE: Both of these comments are how this should work and how I expect it
> to work.  I unfortunately am not
>
> at a place where I can test things at the moment, but this is the way
> things are supposed to work.
>
>
>
> Doug Mueller
>
>
>
>
>
> From: Action Request System discussion list(ARSList) [mailto:
> [email protected]] On Behalf Of Vishal Navale
> Sent: Thursday, November 08, 2012 7:47 AM
> To: [email protected]
> Subject: Re: How to restrict wild card searches
>
>
>
> **
>
> Hi Greg,
>
>
>
> For restricting the wild card character on field level we had created the
> Active link which will fire on search mode .
>
>
>
> The qualification is : ((('Description' LIKE "%[^a-zA-Z0-9]%") OR
> ('Resolution' LIKE "%[^a-zA-Z0-9]%")) OR ('Detailed Decription' LIKE
> "%[^a-zA-Z0-9]%")) OR ('Incident Number' LIKE "%[^a-zA-Z0-9]%")
>
>
>
> If we are giving wild card character for searching on fields (Notes ,
> summary , resolution and Incident ID) , it will throw an error .
>
>
>
> However this Active link is also firing when we are giving space on fields
> like (Notes , summary , resolution and Incident ID).
>
>
>
> We don't want to fire this active link when any user will give space .
>
> Do you know how to a resolve this?
>
>
>
> Vishal
>
>
>
>
>
> On Fri, Oct 26, 2012 at 2:51 PM, Vishal Navale <[email protected]>
> wrote:
>
> Thanks Greg,
>
>
>
> Fantansticts, It works.
>
>
>
> Regards,
>
> Vishal
>
>
>
>
>
>
>
> On Thu, Oct 25, 2012 at 2:56 PM, Givens, Gregory CTR NPC, Pers 54 <
> [email protected]> wrote:
>
> Vishal,
>
> If it's a problem with wild cards being used in specific field(s), you
> could change the QBE Match for the field(s) to "Equal"
> However, doing just that will not stop wild cards in the advanced search
> bar.
> To stop that from being allowed you will need to add a character field to
> the form and give it a field ID of 1005
> Then create a Active link with
> Execution Options - Search
> Run If Qual - ('1005' LIKE (("%" + "[%]") + "%")) OR ('1005' LIKE (("%" +
> "[_]") + "%"))
> If action is an Error message
>
>
> Greg Givens (Contractor)
> Network Applications Support
> Navy Personnel Command
>
>
>
> -----Original Message-----
> From: Action Request System discussion list(ARSList) [mailto:
> [email protected]] On Behalf Of Vishal Navale
> Sent: Thursday, October 25, 2012 6:12 AM
> To: [email protected]
> Subject: How to restrict wild card searches
>
> Hi,
>
> Is there any way to restrict wild card searches on the ARServer 7.5 p4?
>
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org <
> http://www.arslist.org/>
> attend wwrug12 www.wwrug12.com <http://www.wwrug12.com/>  ARSList: "Where
> the Answers Are"
>
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org <
> http://www.arslist.org/>
> attend wwrug12 www.wwrug12.com <http://www.wwrug12.com/>  ARSList: "Where
> the Answers Are"
>
>
>
>
> _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_
>
> _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_
>
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"
>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

Reply via email to