cfloop to list

2008-12-04 Thread Sham Rock
a value to insert into the database. I have created a list (Plist) from the form submitted, Plist===QTY_101,QTY_102,QTY_103 Then I loop through to take out only the fields that have a value, cfloop list=#plist# index=z cfif evaluate(form.qty_#z#) GTE 1 cfoutput#z#-#evaluate(form.qty_#z

Re: cfloop to list

2008-12-04 Thread Azadi Saryev
in the form's action page, loop through #form.fieldnames#, if the fieldname starts with qty_ and has a value - get the prodid from field name using removechars() or listlast() and update the db. something like this: cfloop list=#form.filednames# index=field cfif left(field, 4) is QTY_ AND int(val

CFLOOP, through list, delimiters help

2003-06-04 Thread coldfusion . developer
Swnary [EMAIL PROTECTED] Ral DiazArgentina [EMAIL PROTECTED] Cris Grass Uk [EMAIL PROTECTED] CFFILE ACTION=Read FILE=D:\INETPUB\WWWROOT\wWWROOT\ADMIN_HITTITE\file_1.txt VARIABLE=emailtext CFLOOP INDEX=fred

Re: CFLOOP, through list, delimiters help

2003-06-04 Thread CF Dude
I wrote a simple email parser a while back and instead of the CHR(13) or CHR(10), I used space as my delimiter. Then what I did was look for the @ in each line. If the @ existed, I put it into my list, if it didn't, I ignored that line. Just a suggestion Eric - Original Message -

Re: CFLOOP, through list, delimiters help

2003-06-04 Thread Jerry Johnson
FILE=D:\INETPUB\WWWROOT\wWWROOT\ADMIN_HITTITE\file_1.txt VARIABLE=emailtext CFLOOP INDEX=fred LIST=#ReplaceList(emailtext, , )# DELIMITERS=; CFIF #Trim(fred)# contains @ AND #Trim(fred)# contains . AND #Trim(fred)# IS NOT CFSET fred1 = #Trim(fred

RE: CFLOOP, through list, delimiters help

2003-06-04 Thread Adrian Lynch
If you're after the emails try cffile variable=text ... cfset crlf = Chr(10) Chr(13) cfoutput cfloop list=text index=i delimiters=#crlf# #ListLast(i, Chr(the number for tabs))#br /cfloop /cfoutput This assumes tabs separate the name country and email entries. Ade -Original

Re: CFLOOP, through list, delimiters help

2003-06-04 Thread Ewok
#Chr(13)##Chr(10)# ? - Original Message - From: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 8:51 AM Subject: CFLOOP, through list, delimiters help Help, I'm trying to extract the e-mail addresses from a text file. Here a sample of the text file

RE: CFLOOP, through list, delimiters help

2003-06-04 Thread Adrian Lynch
Make that cfloop list=#text#... instead. Ade -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: 03 June 2003 17:07 To: CF-Talk Subject: RE: CFLOOP, through list, delimiters help If you're after the emails try cffile variable=text ... cfset crlf = Chr(10) Chr(13