Trying Again: CONTAINS issues

2006-05-21 Thread Brent Nicholas
Posted earlier, but I couldn't read it on the site.
--

Howdy all - 
 
So I've been given the lovely task of parsing out an email of values from a 
submitted form. Those in the know are already growning... ;)
 
Well in short it all boils down to this right now. How do you do a contains 
with commas in the values?
 
 
original form feilds:
input name=mover value= Hydrogen Storage type=checkbox
input name=mover value=Gas Transport type=checkbox
input name=mover value=Power / HVAC , Settle, Gas type=checkbox
input name=mover value=Line / Pipe type=checkbox
input name=mover value=Some Option not selected 1 type=checkbox
input name=mover value=Some Option not selected 2 type=checkbox
 
I am doing the following:
 
 
CurrentCompareVar = Power / HVAC , Settle, Gas  - this came out of a 
struct I have of each value with a key
 
mover = CurrentCompareAllOptions = Hydrogen Storage, Gas Transport, Power / 
HVAC , Settle, Gas, Line / Pipe 
 
 
The value for CurrentCompareAllOptions are all of the check boxes that were 
checked and emailed, thus I have no control over the value names otherwise you 
wouldn't be reading this and commas would not be in it except to separate 
values.
 
The CurrentCompareVar came out of a struct of all the values I manually 
populated from all the checkbox values on the form.
 
I then perform:
cfif CurrentCompareAllOptions contains CurrentCompareVar
  They checked this option.
/cfif
It does not work. No, error. Just no match.
 
It does work for every CurrentCompareVar  except if there are commas in the 
value.
 
For example if CurrentCompareVar = Hydrogen Storage I get a match.
or if CurrentCompareVar = Line / Pipe I get a match.
 
 
Let me know if more info is needed. 
 
Thanks to all who can help.
 
BN

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241093
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Trying Again: CONTAINS issues

2006-05-21 Thread Rob Wilkerson
Take a look at cflib.org.  There's a list function that compares 2
lists and returns the shared elements.  It sounds like that might be
what you're looking for.

On 5/21/06, Brent Nicholas [EMAIL PROTECTED] wrote:
 Posted earlier, but I couldn't read it on the site.
 --

 Howdy all -

 So I've been given the lovely task of parsing out an email of values from a 
 submitted form. Those in the know are already growning... ;)

 Well in short it all boils down to this right now. How do you do a 
 contains with commas in the values?


 original form feilds:
 input name=mover value= Hydrogen Storage type=checkbox
 input name=mover value=Gas Transport type=checkbox
 input name=mover value=Power / HVAC , Settle, Gas type=checkbox
 input name=mover value=Line / Pipe type=checkbox
 input name=mover value=Some Option not selected 1 type=checkbox
 input name=mover value=Some Option not selected 2 type=checkbox

 I am doing the following:


 CurrentCompareVar = Power / HVAC , Settle, Gas  - this came out of a 
 struct I have of each value with a key

 mover = CurrentCompareAllOptions = Hydrogen Storage, Gas Transport, Power / 
 HVAC , Settle, Gas, Line / Pipe


 The value for CurrentCompareAllOptions are all of the check boxes that were 
 checked and emailed, thus I have no control over the value names otherwise 
 you wouldn't be reading this and commas would not be in it except to separate 
 values.

 The CurrentCompareVar came out of a struct of all the values I manually 
 populated from all the checkbox values on the form.

 I then perform:
 cfif CurrentCompareAllOptions contains CurrentCompareVar
   They checked this option.
 /cfif
 It does not work. No, error. Just no match.

 It does work for every CurrentCompareVar  except if there are commas in the 
 value.

 For example if CurrentCompareVar = Hydrogen Storage I get a match.
 or if CurrentCompareVar = Line / Pipe I get a match.


 Let me know if more info is needed.

 Thanks to all who can help.

 BN

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241094
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54