Re: [ACFUG Discuss] Reading the results of a cfselect form element

2006-10-20 Thread Leif Wells
Thanks for everyone's answers.I blogged my experiences here:http://www.leifwells.com/index.cfm/2006/10/20/Fun-with-Coldfusion-BlogCFC-Ant-and-ACFUG
If you have any suggestions about my setup, feel free to let me know.Leif



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-



Re: [ACFUG Discuss] Reading the results of a cfselect form element

2006-10-19 Thread Douglas Knudsen
everything in CF is a string! :)1) see above. ;) Really, I don't know how, there is no isString(). 2) checkout listToArray(). 
http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=part_cfm.htmIts been sometime since I did this, but I recall using listToArray() then looping. Or you could just use CFLOOP with the list attribute. 
http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=part_cfm.htm
HTH!DKPostScript: caution, developer under mucho stresso churning out next weeks work and sipping coffee!On 10/19/06, Leif Wells
 [EMAIL PROTECTED] wrote:All,
Sorry for the beginner's question (and my absence from this list and the meetings).I have created a coldfusion file that has form that has a cfselect element. The multiple attribute is set to true.

When processing the form I get what I believe are two UUIDs separated by a comma. A String, I believe.Question 1: How would test to see if this actually is a String?Question 2: How do I convert this String to an Array? Or is there a better way to process a cfselect element?
Leif



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-


-- Douglas Knudsenhttp://www.cubicleman.comthis is my signature, like it?



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-



Re: [ACFUG Discuss] Reading the results of a cfselect form element

2006-10-19 Thread Teddy Payne
If it is a comma delimeted list then:Question 1: How would test to see if this actually is a String? ListLen(variableName) gt 0Question 2: How do I convert this String to an Array? Or is there a better way to process a cfselect element?
ListToArray(variableName)TeddyOn 10/19/06, Leif Wells [EMAIL PROTECTED] wrote:
All,Sorry for the beginner's question (and my absence from this list and the meetings).I have created a coldfusion file that has form that has a cfselect element. The multiple attribute is set to true.

When processing the form I get what I believe are two UUIDs separated by a comma. A String, I believe.Question 1: How would test to see if this actually is a String?Question 2: How do I convert this String to an Array? Or is there a better way to process a cfselect element?
Leif



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-


-- cf_payne /Blog: http://cfpayne.wordpress.com/Atlanta CFUG: http://www.acfug.org




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-



Re: [ACFUG Discuss] Reading the results of a cfselect form element

2006-10-19 Thread Teddy Payne
To really detect for existance of a string you may want to additionally peformcfif IsSimpleValue(variable) and Trim(variable) new This will ensure that the variable is a string, number or a boolean and that the value of the variable is not empty.
TeddyOn 10/19/06, Douglas Knudsen [EMAIL PROTECTED] wrote:
everything in CF is a string! :)1) see above. ;) Really, I don't know how, there is no isString(). 2) checkout listToArray(). 

http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=part_cfm.htmIts been sometime since I did this, but I recall using listToArray() then looping. Or you could just use CFLOOP with the list attribute. 

http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=part_cfm.htm
HTH!DKPostScript: caution, developer under mucho stresso churning out next weeks work and sipping coffee!On 10/19/06, 
Leif Wells
 [EMAIL PROTECTED] wrote:
All,
Sorry for the beginner's question (and my absence from this list and the meetings).I have created a coldfusion file that has form that has a cfselect element. The multiple attribute is set to true.


When processing the form I get what I believe are two UUIDs separated by a comma. A String, I believe.Question 1: How would test to see if this actually is a String?Question 2: How do I convert this String to an Array? Or is there a better way to process a cfselect element?
Leif



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-


-- Douglas Knudsenhttp://www.cubicleman.com
this is my signature, like it?



-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-


-- cf_payne /Blog: http://cfpayne.wordpress.com/Atlanta CFUG: http://www.acfug.org




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-



RE: [ACFUG Discuss] Reading the results of a cfselect form element

2006-10-19 Thread Charlie Arehart



Hi Leif. For those who don't recognize the name, Leif is 
the manager of the Atlanta Adobe User Group.

Leif, for your need, you say that what comes in is 2 UUIDs 
separated by a comma. That's called a "list" in CFML. Now, you say you want to 
test if it's a string. Do you mean you want to test if it's a list? Sadly, while 
there are several "decision functions" (isnumeric, isdate, etc.) there is 
neither isstring, islist, nor isUUID. 

Now, as for separating the the list into an array, you can 
do that with listtoarray(). But if you just want be able to process the list of 
values individually, you don't *need* to put them into an array. You can loop 
over them, with CFLOOP LIST. You can also get at each list element using, 
funnily enough, ListGetAt, or any number of other "list functions". Yes, I'm 
pointing you to the docs, since there may be still other options you'd want to 
consider.

Finally, though, if you might be wanting to take this list 
of UUIDs (or any list) coming from a multiple select form field (or a checkbox) 
and use them in SQL, you may know you could use such a comma-separated list of 
values directly in SQL using the IN clause. But you may really be stumped in 
that you need to get single quotes around the individual elements, to change IN 
(item1, item2) to become IN ('item1','item2'). Here, CFML comes to the rescue 
again with a very often missed function called ListQualify (introduced in CF 
4.01, which is why I think many missed it). So assuming your form field was ids, 
you could use IN (#listqualify(form.ids)#), and it would look like the last 
clause above when sent to SQL.

Is any 
of this close to what you needed? Sorry if I've gone off half-cocked. As always, 
I hope the info might help someone. :-)

/charlie
http://www.carehart.org/blog/



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
On Behalf Of Leif WellsSent: Thursday, October 19, 2006 5:01 
PMTo: discussion@acfug.orgSubject: [ACFUG Discuss] Reading 
the results of a cfselect form element
All,Sorry for the beginner's question (and my absence from 
this list and the meetings).I have created a coldfusion file that has 
form that has a cfselect element. The multiple attribute is set to 
true.When processing the form I get what I believe are two UUIDs 
separated by a comma. A String, I believe.Question 1: How would test to 
see if this actually is a String?Question 2: How do I convert this 
String to an Array? Or is there a better way to process a cfselect element? 
Leif- 
To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform 
For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink 
- 



-

To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by FusionLink

-




RE: [ACFUG Discuss] Reading the results of a cfselect form element

2006-10-19 Thread Charlie Arehart



Just to clarify, that's a CF7-only 
feature.

/charlie
http://www.carehart.org/blog/



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
On Behalf Of Andrew PowellSent: Thursday, October 19, 2006 
6:04 PMTo: discussion@acfug.orgSubject: Re: [ACFUG 
Discuss] Reading the results of a cfselect form element
If you want to see if it's a string you can use:

isValid("string",varToTest)




-

To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by FusionLink

-