Ah! JoinToParent. that's what I was thinking of! Thanks! I was actually able to do it much more simply, however, because I realized that PlumUserRole is already joined in, and that rolecode is actually a string representing the rolename, rather than just a roleId as I would have thought. I thought I posted my solution to the list the moment that I found it, in hopes that people such as yourself didn't have to waste time helping me, and I'm sorry you didn't see it.
Either way, your answer was the exact one I was looking for, so thank you! Tony From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Fleitz Sent: Wednesday, February 06, 2008 4:26 PM To: [email protected] Subject: Re: [plum] plumUserSearchForm It's been quite a while since I've done this, but you should be able to create a view joining the PlumRole/PlumUserRole tables and then treat that as a table in your list results. You will have to add a JoinToParent custom tag call to join the view and the PlumUser table in your list. Give that a try. Jeff On Feb 5, 2008 6:22 PM, Mark Fuqua <[EMAIL PROTECTED]> wrote: Tony, I'm not sure you can do this directly as PlumUser and PlumRole is a many to many relationship, with PlumUserRole there in the middle. I'm sure you could work with a custom query or a cfswitch on the list page with the right where clause extension for each role, but personally, I have a contactType field in all my apps as part of the plumUser table that more or less correlates to user role...but not always. But it does allow me to do that type of search without any pain. David, Adam, Al, Jeff or one of the other smart guys out there might be able to give you a better answer, but I think it will take a bit of a 'hack'. Mark -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of {tonyfelice} Sent: Tuesday, February 05, 2008 5:07 PM To: [email protected] Subject: RE: [plum] plumUserSearchForm Well, guys... With all the activity out here today, I figured I'd keep the ball rolling with a question of my own: In plumUserSearchForm.cfm (assuming that I'm in the code, and no longer in the IDE), what's the trick to include role in the search? I recall seeing this at one time, and can't recall... Thanks! Tony Felice > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:plum- > [EMAIL PROTECTED] On Behalf Of David Churvis > Sent: Tuesday, February 05, 2008 1:55 PM > To: [email protected] > Subject: RE: [plum] Plum validate input > > Oops! Al was correct. The * says "any number of occurrences of the > previous group." So all together, the expression '^[A-Za-z0-9]*$' > means: > > ^ the beginning of the string, followed by > [A-Za-z0-9] any alphanumeric character, > * repeated zero or more times (or more literally, *occurring* zero or > more > times), followed by > $ the end of the string. > > Thanks to Al - for some reason I did not get your message in my inbox, > but > you were spot on! > > Thanks, > David > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mark > Fuqua > Sent: Tuesday, February 05, 2008 3:26 PM > To: [email protected] > Subject: RE: [plum] Plum validate input > > That worked. Just curious, what is the difference made by the * > symbol? > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Al > Rogers > Sent: Tuesday, February 05, 2008 2:49 PM > To: [email protected] > Subject: RE: [plum] Plum validate input > > > Thanks, Dave... I also love Plum. > > Doesn't your expression below need to include a * as in: > > '^[A-Za-z0-9]*$' > > Al > > -------------------------------- > Al Rogers [EMAIL PROTECTED] > Global SchoolNet Foundation > http://www.globalschoolnet.org > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On > > Behalf Of David Churvis > > Sent: Tuesday, February 05, 2008 9:06 AM > > To: [email protected] > > Subject: RE: [plum] Plum validate input > > > > Hi Mark, > > > > In order to validate that there is nothing but alphanumeric > > characters, use > > an expression like "^[A-Za-z0-9]$" - the ^ matches the > > beginning of the line > > and the $ matches the end. All "[a-z0-9]" would match is > > that there is an > > alphanumeric character in the string at all. The > > carat-dollar confusion is > > such a big topic in regex circles and we were originally > > considering adding > > them automatically. Let me know if it works for you :) > > > > Hope this helps, > > David Churvis > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On > > Behalf Of Mark Fuqua > > Sent: Tuesday, February 05, 2008 11:38 AM > > To: [email protected] > > Subject: [plum] Plum validate input > > > > I love plum and today I saw Adam post a reply on > > cftalk...maybe there is > > hope for the world after all. > > > > Has any one on the list (is any one still on the list?) used > > the regular > > expression attribute of the validateinput tag? > > > > I was trying to use a simple regex yesterday (disclaimer: I > > don't really > > understand regular expressions) and wasn't able to get it to > > work. I was > > trying to verify that the input had no special characters > > and no spaces. I > > tried a bunch of different combinations, but this is the one > > I most thought > > should work. [a-z0-9]. > > > > Whatever I tried, it either passed every input or failed every > input, > > irregardless of whether or not there were special characters > > or spaces. > > > > Then I had this crazy idea that I should add quotes to the > > lines in the > > validateinput tag that do the check as so... > > > > Take the existing REFind: > > > > <!--- Evaluate against a regular expression ---> > > <cfif Len(Trim(Attributes.regularExpression))> > > <cfif REFind(Attributes.regularExpression, > > Attributes.value) EQ 0> > > <cfthrow type="Validation.InvalidData" > > > > message="#Attributes.regularExpressionMessage#" > > errorCode="62200"> > > </cfif> > > </cfif> > > > > And add some quotes: > > > > <!--- Evaluate against a regular expression ---> > > <cfif Len(Trim(Attributes.regularExpression))> > > <cfif REFind("Attributes.regularExpression", > > Attributes.value) EQ 0> > > <cfthrow type="Validation.InvalidData" > > > > message="#Attributes.regularExpressionMessage#" > > errorCode="62200"> > > </cfif> > > </cfif> > > > > But that didn't work either. > > > > > > > > Any ideas? > > > > Mark Fuqua > > > > > > > > ************************************************************* > > ********* > > You can subscribe to and unsubscribe from lists, and you can change > > your subscriptions between normal and digest modes here: > > > > http://www.productivityenhancement.com/support/DiscussionList > > sForm.cfm > > ************************************************************* > > ********* > > > > > > ************************************************************* > > ********* > > You can subscribe to and unsubscribe from lists, and you can change > > your subscriptions between normal and digest modes here: > > > > http://www.productivityenhancement.com/support/DiscussionList > > sForm.cfm > > ************************************************************* > > ********* > > > > > > ********************************************************************** > You can subscribe to and unsubscribe from lists, and you can change > your subscriptions between normal and digest modes here: > > http://www.productivityenhancement.com/support/DiscussionListsForm.cfm > ********************************************************************** > > > ********************************************************************** > You can subscribe to and unsubscribe from lists, and you can change > your subscriptions between normal and digest modes here: > > http://www.productivityenhancement.com/support/DiscussionListsForm.cfm > ********************************************************************** > > > ********************************************************************** > You can subscribe to and unsubscribe from lists, and you can change > your subscriptions between normal and digest modes here: > > http://www.productivityenhancement.com/support/DiscussionListsForm.cfm > ********************************************************************** ********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm ********************************************************************** ********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm ********************************************************************** -- v/r, Jeff Fleitz
