Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
richm Offline
Member
 
richm's Avatar
 
Posts: 387
Join Date: Jan 2007
Location: Orange County, CA
Regex validation and custom fields (how to make it work?) - 29-03-2007, 08:40 PM

Hi,


I created a custom field, of type "select" which is set to is required and because we can't set up one of the values as blank (ie nothing selected) I've set one selection (the default) to "---" (minus the quotes)

Here are the choices in the custom field for reference:

LOS
Broker Portal
ERM
PRIME
Pixmo
3rd Party
---


I'm trying to set up a regex validation so that, if the user doesn't change the field from --- (the default), it will stop them and make them choose one of the other valid selections.

So far, everything I try results in "One of the required field(s) is empty"

I'm no regex expert, so I've put the ones I have tried through a couple of different regex validators and they work (at least in that tool)

I have tried the following:

^\-{3}
^\-{3,3}?
^\-{3,}?
^\-{3}?
^\-{3,}?


All of which result in ""One of the required field(s) is empty"
no matter what I choose in the drop-down.

Anyone know what I might be doing wrong here? (Or what the trick to getting this to work is?)

Thanks,

Rich

P.S. I have opened a ticket for this as well.


--
Features I need asap:
1) Ticket search in the client portal!
2) Column display in client portal showing clients email address or name
3) Downloads by client
(i.e. - each client has their own download area and can't see/touch downloads for any other client.) This would be on top of a "public" download area.
4) Integrated KB image uploads
The ability for staff to upload images with a KB articles.
Cheers!
   
Reply With Quote
  (#2) Old
bear Offline
Community Moderator
 
Posts: 709
Join Date: Jan 2005
29-03-2007, 09:22 PM

Why do it the hard way? The value isn't being changed, so you know it's a constant and not a variable: "---". What I think you need is simply: "^---", without the "quotes".
   
Reply With Quote
  (#3) Old
richm Offline
Member
 
richm's Avatar
 
Posts: 387
Join Date: Jan 2007
Location: Orange County, CA
29-03-2007, 10:28 PM

Thanks for taking the time to reply bear!

Your suggestion makes perfect sense to me. ...Unfortunately, the kayako regex engine doesn't think so.

If you or anyone else have further suggestions for solving this enigma, I'd love to hear them.

Regards,

Rich


--
Features I need asap:
1) Ticket search in the client portal!
2) Column display in client portal showing clients email address or name
3) Downloads by client
(i.e. - each client has their own download area and can't see/touch downloads for any other client.) This would be on top of a "public" download area.
4) Integrated KB image uploads
The ability for staff to upload images with a KB articles.
Cheers!
   
Reply With Quote
  (#4) Old
bear Offline
Community Moderator
 
Posts: 709
Join Date: Jan 2005
30-03-2007, 02:03 AM

Can you paste the code for the drop down here? Mine, and a few of yours should have worked.
   
Reply With Quote
  (#5) Old
richm Offline
Member
 
richm's Avatar
 
Posts: 387
Join Date: Jan 2007
Location: Orange County, CA
30-03-2007, 02:45 AM

My apologies if I'm being daft, but did you mean the regex validation I used? Or something from a template perhaps? (I'm pretty new to the app)

If it's regex validation I used, this is what I have currently:

^---

Rich


--
Features I need asap:
1) Ticket search in the client portal!
2) Column display in client portal showing clients email address or name
3) Downloads by client
(i.e. - each client has their own download area and can't see/touch downloads for any other client.) This would be on top of a "public" download area.
4) Integrated KB image uploads
The ability for staff to upload images with a KB articles.
Cheers!
   
Reply With Quote
  (#6) Old
richm Offline
Member
 
richm's Avatar
 
Posts: 387
Join Date: Jan 2007
Location: Orange County, CA
30-03-2007, 06:13 PM

I figured it out.

This is the expression that finally worked:

[^[^---]]


As a suggestion, if Kayako could publish some guidelines/common examples of how their regex engine works, it would be helpful. (Given that the other examples I provided in this post (which didn't work with kayako regex) validated with a number of regex testers I tried)

Even a few pages of examples of common expressions a client might filter on would be immensely helpful.

Regards & thanks for the assistance!

Rich


--
Features I need asap:
1) Ticket search in the client portal!
2) Column display in client portal showing clients email address or name
3) Downloads by client
(i.e. - each client has their own download area and can't see/touch downloads for any other client.) This would be on top of a "public" download area.
4) Integrated KB image uploads
The ability for staff to upload images with a KB articles.
Cheers!
   
Reply With Quote
  (#7) Old
bear Offline
Community Moderator
 
Posts: 709
Join Date: Jan 2005
30-03-2007, 09:10 PM

Just passed that through my regex editor, and it makes no sense at all. According to that, it's set to *not* match anything within the inner "[ ]", but it will match the opening and closing "[ ]". Strange.
   
Reply With Quote
  (#8) Old
richm Offline
Member
 
richm's Avatar
 
Posts: 387
Join Date: Jan 2007
Location: Orange County, CA
30-03-2007, 11:46 PM

I hear you. It doesn't validate in any of the testers I run it through either.

If they're going to be nonstandard, they should at least publish a white paper/some examples of common things you would filter on/ways to overcome product limitations (like the original issue here, e.g. no "blank" items in a drop-down)

Something...

As for this: [^[^---]]

My guess is this is evaluating (in the kayako regex engine) as:

[not [any subject line that begins with ---]]

Rich


--
Features I need asap:
1) Ticket search in the client portal!
2) Column display in client portal showing clients email address or name
3) Downloads by client
(i.e. - each client has their own download area and can't see/touch downloads for any other client.) This would be on top of a "public" download area.
4) Integrated KB image uploads
The ability for staff to upload images with a KB articles.
Cheers!
   
Reply With Quote
  (#9) Old
smartohana Offline
Member
 
Posts: 38
Join Date: Nov 2007
24-12-2007, 11:19 PM

Quote:
As for this: [^[^---]]
I'm pretty sure all this is doing is making sure you can't select anything with a "-" in it. If this is the only select item that has a "-" in it, it will work, but I don't think this is doing what you want.

I've not tested it extensively, but basically, if you want to make sure a particular item is not select, you could do something like:

/^(?!This is the default choice)$/

Pretty sure this accomplishes what you are looking for. Basically, it makes sure the selected choice can not be "This is the default choice". Something like that.
   
Reply With Quote
Reply

Tags
custom, make, regex, validation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46