RE: Multiple value Select
Sorry I couldn't get back in time.. i was on a road trip. thanks for the extra push Katrina, I was stumbling, there. -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 3:10 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select It works!!! Thank you so much to everyone who helped along the way. My goal is to one day be 1/10th as helpful to the list as the list has been to me. At this point (given how much I get and how little I now know), that's a huge goal. Thanks again. Athelene -Original Message- From: David E. Crawford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 12:25 PM To: [EMAIL PROTECTED] Subject: Re: Multiple value Select I am using Outlook Express, and have it set up to reply to messages in their original format, which in this case is HTML, or to compose new messages in plain text. For some reason the list is not properly handling the mime conversion. To see if perhaps this is fixed, I have changed it to send in plain text only, regardless of the format of the incoming message. It has been annoying to me, because other messages besides mine have been turned to mush. DC - Original Message - From: "Chapman, Katrina" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 09, 2000 17:03 Subject: RE: Multiple value Select The 3D shouldn't be there. It's because a very bad David;) is sending messages in HTML format, or some format other than plain text. Just remove any 3D's you may have copied and it should work. --K -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 8:50 AM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select OK. I copied the code into the document. Now it's not liking the first quote in the CFSELECT statement: cfselect name=3D"NewPG" size=3D"3" multiple Did I just misunderstand what the 3D represented? Is there just a syntax error I'm not seeing. Tried to find some reference to it in the books I have (I assumed it stood for dimension?) with no luck. TIA, Athelene -Original Message- From: David E. Crawford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 7:42 AM To: [EMAIL PROTECTED] Subject: Re: Multiple value Select This is a multi-part message in MIME format. --=_NextPart_000_00EF_01C001FF.3F8198C0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: Multiple value SelectOk, now we have a bit of information. Try this: cfselect name=3D"NewPG" size=3D"3" multiple=20 CFOutput query=3D"GetPG" !--- OPENING CFOUTPUT ---=20 CFIF ListFindNoCase(EditNameQry.PracticeGroup,GetPG.PG)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected# value=3D"#PG#"#PG#/option !--- NO=20 CFOUTPUTS ---=20 /cfoutput !--- CLOSING CFOUTPUT ---=20 /cfselect=20 Change the order of the parameters to the = Listfindnocase()/Listcontains() functions. If EditNameQry.PracticeGroup = is a comma seperated list and GETPG.PG is a single value, this should = work. DC - Original Message -=20 From: Gieseman, Athelene=20 To: '[EMAIL PROTECTED]'=20 Sent: Tuesday, August 08, 2000 21:36 Subject: RE: Multiple value Select No. That field would have multiple items in a comma-delimited format. = Not=20 even the first option is selected.=20 Athelene=20 -Original Message-=20 From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:33 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 This may be a stupid question but the query EditNameQry is only = pulling one=20 value for PracticeGroup. Right? If not I'm sure that when you "view=20 source" you'll see that more than one option is "SELECTED". That will = confuse the browser and it will stay on the first option.=20 --K=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 2:04 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 Yo may have a point.. try putting quotes around = EditNameQry.PracticeGroup.=20 Plus, if I replace=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 with=20 CFIF ListContains(GetPG.PG,"Agribusiness")=20 the Agribusiness option is selected. So I think I'm doing something = wrong=20 in how I'm using the second parameter of the ListContains.=20 -Original Message-=20 From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]]=20 Sent:
Re: Multiple value Select
This is a multi-part message in MIME format. --=_NextPart_000_00EF_01C001FF.3F8198C0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: Multiple value SelectOk, now we have a bit of information. Try this: cfselect name=3D"NewPG" size=3D"3" multiple=20 CFOutput query=3D"GetPG" !--- OPENING CFOUTPUT ---=20 CFIF ListFindNoCase(EditNameQry.PracticeGroup,GetPG.PG)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected# value=3D"#PG#"#PG#/option !--- NO=20 CFOUTPUTS ---=20 /cfoutput !--- CLOSING CFOUTPUT ---=20 /cfselect=20 Change the order of the parameters to the = Listfindnocase()/Listcontains() functions. If EditNameQry.PracticeGroup = is a comma seperated list and GETPG.PG is a single value, this should = work. DC - Original Message -=20 From: Gieseman, Athelene=20 To: '[EMAIL PROTECTED]'=20 Sent: Tuesday, August 08, 2000 21:36 Subject: RE: Multiple value Select No. That field would have multiple items in a comma-delimited format. = Not=20 even the first option is selected.=20 Athelene=20 -Original Message-=20 From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:33 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 This may be a stupid question but the query EditNameQry is only = pulling one=20 value for PracticeGroup. Right? If not I'm sure that when you "view=20 source" you'll see that more than one option is "SELECTED". That will = confuse the browser and it will stay on the first option.=20 --K=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 2:04 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 Yo may have a point.. try putting quotes around = EditNameQry.PracticeGroup.=20 Plus, if I replace=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 with=20 CFIF ListContains(GetPG.PG,"Agribusiness")=20 the Agribusiness option is selected. So I think I'm doing something = wrong=20 in how I'm using the second parameter of the ListContains.=20 -Original Message-=20 From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:18 PM=20 To: '[EMAIL PROTECTED]'=20 Subject: RE: Multiple value Select=20 No luck. I think there's a problem in that the listcontains isn't = finding=20 any matches. I can't figure out why. I display the previously = selected=20 items in another part of the form and it is identical to the options = in the=20 database. There is a comma separating the selected items. For = example, the=20 record viewed via SQL shows: "Agribusiness,Commercial Litigation" = (less the=20 quotes) in the field. Both of those practice groups are identically = listed=20 in the GetPG.PG list. Yet neither of them are showing up selected in = the=20 control. Plus, if I replace=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 with=20 CFIF ListContains(GetPG.PG,"Agribusiness")=20 the Agribusiness option is selected. So I think I'm doing something = wrong=20 in how I'm using the second parameter of the ListContains.=20 Athelene=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 3:00 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 take the cfoutput tags out of the options and put them within the = entire=20 select tag:=20 cfselect name=3D"NewPG" size=3D"3" multiple=20 CFOutput query=3D"GetPG" !--- OPENING CFOUTPUT ---=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected# value=3D"#PG#"#PG#/option !--- NO = CFOUTPUTS ---=20 /cfoutput !--- CLOSING CFOUTPUT ---=20 /cfselect=20 -----Original Message-=20 From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 3:44 PM=20 To: '[EMAIL PROTECTED]'=20 Subject: RE: Multiple value Select=20 Still no luck. I also added an rtrim function to each of the fields = in that=20 line. And I've tried David's suggestion of using listcontainsnocase. = Still=20 no luck. I also changed the code this way:=20 CFIF = listfindnocase(rtrim(getpg.pg),rtrim(EditNameQry.PracticeGroup))=20 CFSET PGSelected
RE: Multiple value Select
OK. I copied the code into the document. Now it's not liking the first quote in the CFSELECT statement: cfselect name=3D"NewPG" size=3D"3" multiple Did I just misunderstand what the 3D represented? Is there just a syntax error I'm not seeing. Tried to find some reference to it in the books I have (I assumed it stood for dimension?) with no luck. TIA, Athelene -Original Message- From: David E. Crawford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 7:42 AM To: [EMAIL PROTECTED] Subject: Re: Multiple value Select This is a multi-part message in MIME format. --=_NextPart_000_00EF_01C001FF.3F8198C0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: Multiple value SelectOk, now we have a bit of information. Try this: cfselect name=3D"NewPG" size=3D"3" multiple=20 CFOutput query=3D"GetPG" !--- OPENING CFOUTPUT ---=20 CFIF ListFindNoCase(EditNameQry.PracticeGroup,GetPG.PG)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected# value=3D"#PG#"#PG#/option !--- NO=20 CFOUTPUTS ---=20 /cfoutput !--- CLOSING CFOUTPUT ---=20 /cfselect=20 Change the order of the parameters to the = Listfindnocase()/Listcontains() functions. If EditNameQry.PracticeGroup = is a comma seperated list and GETPG.PG is a single value, this should = work. DC - Original Message -=20 From: Gieseman, Athelene=20 To: '[EMAIL PROTECTED]'=20 Sent: Tuesday, August 08, 2000 21:36 Subject: RE: Multiple value Select No. That field would have multiple items in a comma-delimited format. = Not=20 even the first option is selected.=20 Athelene=20 -Original Message-=20 From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:33 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 This may be a stupid question but the query EditNameQry is only = pulling one=20 value for PracticeGroup. Right? If not I'm sure that when you "view=20 source" you'll see that more than one option is "SELECTED". That will = confuse the browser and it will stay on the first option.=20 --K=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 2:04 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 Yo may have a point.. try putting quotes around = EditNameQry.PracticeGroup.=20 Plus, if I replace=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 with=20 CFIF ListContains(GetPG.PG,"Agribusiness")=20 the Agribusiness option is selected. So I think I'm doing something = wrong=20 in how I'm using the second parameter of the ListContains.=20 -Original Message-=20 From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:18 PM=20 To: '[EMAIL PROTECTED]'=20 Subject: RE: Multiple value Select=20 No luck. I think there's a problem in that the listcontains isn't = finding=20 any matches. I can't figure out why. I display the previously = selected=20 items in another part of the form and it is identical to the options = in the=20 database. There is a comma separating the selected items. For = example, the=20 record viewed via SQL shows: "Agribusiness,Commercial Litigation" = (less the=20 quotes) in the field. Both of those practice groups are identically = listed=20 in the GetPG.PG list. Yet neither of them are showing up selected in = the=20 control. Plus, if I replace=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 with=20 CFIF ListContains(GetPG.PG,"Agribusiness")=20 the Agribusiness option is selected. So I think I'm doing something = wrong=20 in how I'm using the second parameter of the ListContains.=20 Athelene=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 3:00 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 take the cfoutput tags out of the options and put them within the = entire=20 select tag:=20 cfselect name=3D"NewPG" size=3D"3" multiple=20 CFOutput query=3D"GetPG" !--- OPENING CFOUTPUT ---=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected# value=3D"#PG#"#PG#/option !--- NO = CFOUTPUTS ---=20
RE: Multiple value Select
The 3D shouldn't be there. It's because a very bad David;) is sending messages in HTML format, or some format other than plain text. Just remove any 3D's you may have copied and it should work. --K -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 8:50 AM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select OK. I copied the code into the document. Now it's not liking the first quote in the CFSELECT statement: cfselect name=3D"NewPG" size=3D"3" multiple Did I just misunderstand what the 3D represented? Is there just a syntax error I'm not seeing. Tried to find some reference to it in the books I have (I assumed it stood for dimension?) with no luck. TIA, Athelene -Original Message- From: David E. Crawford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 7:42 AM To: [EMAIL PROTECTED] Subject: Re: Multiple value Select This is a multi-part message in MIME format. --=_NextPart_000_00EF_01C001FF.3F8198C0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: Multiple value SelectOk, now we have a bit of information. Try this: cfselect name=3D"NewPG" size=3D"3" multiple=20 CFOutput query=3D"GetPG" !--- OPENING CFOUTPUT ---=20 CFIF ListFindNoCase(EditNameQry.PracticeGroup,GetPG.PG)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected# value=3D"#PG#"#PG#/option !--- NO=20 CFOUTPUTS ---=20 /cfoutput !--- CLOSING CFOUTPUT ---=20 /cfselect=20 Change the order of the parameters to the = Listfindnocase()/Listcontains() functions. If EditNameQry.PracticeGroup = is a comma seperated list and GETPG.PG is a single value, this should = work. DC - Original Message -=20 From: Gieseman, Athelene=20 To: '[EMAIL PROTECTED]'=20 Sent: Tuesday, August 08, 2000 21:36 Subject: RE: Multiple value Select No. That field would have multiple items in a comma-delimited format. = Not=20 even the first option is selected.=20 Athelene=20 -Original Message-=20 From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:33 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 This may be a stupid question but the query EditNameQry is only = pulling one=20 value for PracticeGroup. Right? If not I'm sure that when you "view=20 source" you'll see that more than one option is "SELECTED". That will = confuse the browser and it will stay on the first option.=20 --K=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 2:04 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 Yo may have a point.. try putting quotes around = EditNameQry.PracticeGroup.=20 Plus, if I replace=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 with=20 CFIF ListContains(GetPG.PG,"Agribusiness")=20 the Agribusiness option is selected. So I think I'm doing something = wrong=20 in how I'm using the second parameter of the ListContains.=20 -Original Message-=20 From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:18 PM=20 To: '[EMAIL PROTECTED]'=20 Subject: RE: Multiple value Select=20 No luck. I think there's a problem in that the listcontains isn't = finding=20 any matches. I can't figure out why. I display the previously = selected=20 items in another part of the form and it is identical to the options = in the=20 database. There is a comma separating the selected items. For = example, the=20 record viewed via SQL shows: "Agribusiness,Commercial Litigation" = (less the=20 quotes) in the field. Both of those practice groups are identically = listed=20 in the GetPG.PG list. Yet neither of them are showing up selected in = the=20 control. Plus, if I replace=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 with=20 CFIF ListContains(GetPG.PG,"Agribusiness")=20 the Agribusiness option is selected. So I think I'm doing something = wrong=20 in how I'm using the second parameter of the ListContains.=20 Athelene=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 3:00 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 take the cfoutput tags out of the options and put them within the = entire=20 select tag:=20 cfselect name=3D"NewPG" size=3D"3" multiple=20 CFOutput query=3D&
Re: Multiple value Select
I am using Outlook Express, and have it set up to reply to messages in their original format, which in this case is HTML, or to compose new messages in plain text. For some reason the list is not properly handling the mime conversion. To see if perhaps this is fixed, I have changed it to send in plain text only, regardless of the format of the incoming message. It has been annoying to me, because other messages besides mine have been turned to mush. DC - Original Message - From: "Chapman, Katrina" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 09, 2000 17:03 Subject: RE: Multiple value Select The 3D shouldn't be there. It's because a very bad David;) is sending messages in HTML format, or some format other than plain text. Just remove any 3D's you may have copied and it should work. --K -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 8:50 AM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select OK. I copied the code into the document. Now it's not liking the first quote in the CFSELECT statement: cfselect name=3D"NewPG" size=3D"3" multiple Did I just misunderstand what the 3D represented? Is there just a syntax error I'm not seeing. Tried to find some reference to it in the books I have (I assumed it stood for dimension?) with no luck. TIA, Athelene -Original Message- From: David E. Crawford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 7:42 AM To: [EMAIL PROTECTED] Subject: Re: Multiple value Select This is a multi-part message in MIME format. --=_NextPart_000_00EF_01C001FF.3F8198C0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: Multiple value SelectOk, now we have a bit of information. Try this: cfselect name=3D"NewPG" size=3D"3" multiple=20 CFOutput query=3D"GetPG" !--- OPENING CFOUTPUT ---=20 CFIF ListFindNoCase(EditNameQry.PracticeGroup,GetPG.PG)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected# value=3D"#PG#"#PG#/option !--- NO=20 CFOUTPUTS ---=20 /cfoutput !--- CLOSING CFOUTPUT ---=20 /cfselect=20 Change the order of the parameters to the = Listfindnocase()/Listcontains() functions. If EditNameQry.PracticeGroup = is a comma seperated list and GETPG.PG is a single value, this should = work. DC - Original Message -=20 From: Gieseman, Athelene=20 To: '[EMAIL PROTECTED]'=20 Sent: Tuesday, August 08, 2000 21:36 Subject: RE: Multiple value Select No. That field would have multiple items in a comma-delimited format. = Not=20 even the first option is selected.=20 Athelene=20 -Original Message-=20 From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:33 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 This may be a stupid question but the query EditNameQry is only = pulling one=20 value for PracticeGroup. Right? If not I'm sure that when you "view=20 source" you'll see that more than one option is "SELECTED". That will = confuse the browser and it will stay on the first option.=20 --K=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 2:04 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 Yo may have a point.. try putting quotes around = EditNameQry.PracticeGroup.=20 Plus, if I replace=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 with=20 CFIF ListContains(GetPG.PG,"Agribusiness")=20 the Agribusiness option is selected. So I think I'm doing something = wrong=20 in how I'm using the second parameter of the ListContains.=20 -Original Message-=20 From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:18 PM=20 To: '[EMAIL PROTECTED]'=20 Subject: RE: Multiple value Select=20 No luck. I think there's a problem in that the listcontains isn't = finding=20 any matches. I can't figure out why. I display the previously = selected=20 items in another part of the form and it is identical to the options = in the=20 database. There is a comma separating the selected items. For = example, the=20 record viewed via SQL shows: "Agribusiness,Commercial Litigation" = (less the=20 quotes) in the field. Both of those practice groups are identically = listed=20 in the GetPG.PG list. Yet neither of them are showing up selected in = the=20 control. Plus, if
RE: Multiple value Select
It works!!! Thank you so much to everyone who helped along the way. My goal is to one day be 1/10th as helpful to the list as the list has been to me. At this point (given how much I get and how little I now know), that's a huge goal. Thanks again. Athelene -Original Message- From: David E. Crawford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 12:25 PM To: [EMAIL PROTECTED] Subject: Re: Multiple value Select I am using Outlook Express, and have it set up to reply to messages in their original format, which in this case is HTML, or to compose new messages in plain text. For some reason the list is not properly handling the mime conversion. To see if perhaps this is fixed, I have changed it to send in plain text only, regardless of the format of the incoming message. It has been annoying to me, because other messages besides mine have been turned to mush. DC - Original Message - From: "Chapman, Katrina" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 09, 2000 17:03 Subject: RE: Multiple value Select The 3D shouldn't be there. It's because a very bad David;) is sending messages in HTML format, or some format other than plain text. Just remove any 3D's you may have copied and it should work. --K -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 8:50 AM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select OK. I copied the code into the document. Now it's not liking the first quote in the CFSELECT statement: cfselect name=3D"NewPG" size=3D"3" multiple Did I just misunderstand what the 3D represented? Is there just a syntax error I'm not seeing. Tried to find some reference to it in the books I have (I assumed it stood for dimension?) with no luck. TIA, Athelene -Original Message- From: David E. Crawford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 7:42 AM To: [EMAIL PROTECTED] Subject: Re: Multiple value Select This is a multi-part message in MIME format. --=_NextPart_000_00EF_01C001FF.3F8198C0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: Multiple value SelectOk, now we have a bit of information. Try this: cfselect name=3D"NewPG" size=3D"3" multiple=20 CFOutput query=3D"GetPG" !--- OPENING CFOUTPUT ---=20 CFIF ListFindNoCase(EditNameQry.PracticeGroup,GetPG.PG)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected# value=3D"#PG#"#PG#/option !--- NO=20 CFOUTPUTS ---=20 /cfoutput !--- CLOSING CFOUTPUT ---=20 /cfselect=20 Change the order of the parameters to the = Listfindnocase()/Listcontains() functions. If EditNameQry.PracticeGroup = is a comma seperated list and GETPG.PG is a single value, this should = work. DC - Original Message -=20 From: Gieseman, Athelene=20 To: '[EMAIL PROTECTED]'=20 Sent: Tuesday, August 08, 2000 21:36 Subject: RE: Multiple value Select No. That field would have multiple items in a comma-delimited format. = Not=20 even the first option is selected.=20 Athelene=20 -Original Message-=20 From: Chapman, Katrina [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:33 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 This may be a stupid question but the query EditNameQry is only = pulling one=20 value for PracticeGroup. Right? If not I'm sure that when you "view=20 source" you'll see that more than one option is "SELECTED". That will = confuse the browser and it will stay on the first option.=20 --K=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 2:04 PM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 Yo may have a point.. try putting quotes around = EditNameQry.PracticeGroup.=20 Plus, if I replace=20 CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 with=20 CFIF ListContains(GetPG.PG,"Agribusiness")=20 the Agribusiness option is selected. So I think I'm doing something = wrong=20 in how I'm using the second parameter of the ListContains.=20 -Original Message-=20 From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 4:18 PM=20 To: '[EMAIL PROTECTED]'=20 Subject: RE: Multiple value Select=20 No luck. I think there's a problem in that the listcontains isn't = finding=20 any matches. I can't figure out why. I display the previously = selected=20 items in ano
RE: Multiple value Select
I did this sort of thing for an intranet i'm working on with selected company newsgroups... The best way to do it is with a database of your finance types. This will allow you to updae the select statement without changing the hard coding. So the form will always be right. Query that database and the user database. In the user database, you will want to save a comma delimited list of the finance types they are assigned for. When you bring up the select, you can scroll through all the finance types, and if the user had any in his/her list, they will set the FinanceSelected variable to 'selected.' if they're not in the list, FinanceSelected will be blank. Hope this helps... CFQuery Name="GetFinances" datasource="#Application.datasource#" SELECTFinanceName FROM tblFinances ORDER By FinanceName /CFQuery CFQuery Name="GetCustomer" datasource="#Application.datasource#" SELECTCustomerName, Address, Finances!--- This Field is a comma delimited list of the user's finances --- FROM tblCustomers WHERE CustomerID = #Attributes.CustomerID# /cfgquery Finances:br Select Name="Finances" size="#GetFinances.RecordCount#" multiple CFLoop query="Finances" CFIF ListContains(GetCustomer.Finances,#FinanceName#) CFSET FinanceSelected = "Selected" CFELSE CFSET FinanceSelected = "" /cfif Option #FiannceSelected# value="#FinanceName#"#FinanceName#/option /cfloop /select Mark Armendariz Righteous Design www.sorighteous.com [EMAIL PROTECTED] -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Monday, August 07, 2000 6:34 PM To: [EMAIL PROTECTED] Subject: Multiple value Select I'm trying to set up a CFSELECT using the SELECTED option. I need to have the CFSELECT set up as multiple since more than one option is permitted. However, I can never seem to get the SELECTED option to properly highlight the options that are already stored in the record. (In other words, I want to create an edit screen where the previously stored values are preselected in this control.) Any thoughts on what I may be doing wrong? The code for my select follows: (Note that ViewGrid is a grid from which the user previously selected this record. I've also tried doing this from a query with the same result - nothing is selected.) cfselect name="FinanceType" size="2" selected="#ViewGrid.FinanceType#" multiple option value="Single Family Housing"Single Family Housing/option option value="501(c)(3)"501(c)(3)/option option value="Hospital Revenue"Hospital Revenue/option option value="Leasehold Revenue"Leasehold Revenue/option option value="Multifamily Housing"Multifamily Housing/option option value="General Obligation"General Obligation/option option value="NID"NID/option option value="Special Obligation"Special Obligation/option option value="Industrial Development"Industrial Development/option option value="TIF"TIF/option option value="TDD/TC"TDD/TC/option option value="Other"Other/option /cfselect -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: Multiple value Select
If you are going to list them each manually like you have below, You could do something like: cfselect name="FinanceType" size="2" multiple option value="Single Family Housing" CFIF ListContains(Viewgrid.FinanceType, "Single Family Housing")SELECTED/CFIFSingle Family Housing/option option value="501(c)(3)"CFIF ListContains(Viewgrid.FinanceType, "501(c)(3)")SELECTED/CFIF501(c)(3)/option option value="Hospital Revenue"CFIF ListContains(Viewgrid.FinanceType, "Hospital Revenue")SELECTED/CFIFHospital Revenue/option option value="Leasehold Revenue"CFIF ListContains(Viewgrid.FinanceType, "Leasehold Revenue")SELECTED/CFIFLeasehold Revenue/option option value="Multifamily Housing" CFIF ListContains(Viewgrid.FinanceType, "Multifamily Housing")SELECTED/cfifMultifamily Housing/option option value="General Obligation" CFIF ListContains(Viewgrid.FinanceType, "General Obligation")SELECTED/cfifGeneral Obligation/option option value="NID" CFIF ListContains(Viewgrid.FinanceType, "NID")SELECTED/cfifNID/option option value="Special Obligation" CFIF ListContains(Viewgrid.FinanceType, "Special Obligation")SELECTED/cfifSpecial Obligation/option option value="Industrial Development" CFIF ListContains(Viewgrid.FinanceType, "Industrial Development")SELECTED/cfifIndustrial Development/option option value="TIF" CFIF ListContains(ViewGrid.FinanceType, "TIF")Selected/cfifTIF/option option value="TDD/TC" CFIF ListContains(Viewgrid.FinanceType, "TDD/TC")SELECTED/cfifTDD/TC/option option value="Other" CFIF ListContains(Viewgrid.FinanceType, "Other")SELECTED/cfifOther/option /cfselect Hope this helps H Larry Juncker L Senior Cold Fusion Programmer I Heartland Communications Group Internet Division -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Monday, August 07, 2000 5:34 PM To: [EMAIL PROTECTED] Subject: Multiple value Select I'm trying to set up a CFSELECT using the SELECTED option. I need to have the CFSELECT set up as multiple since more than one option is permitted. However, I can never seem to get the SELECTED option to properly highlight the options that are already stored in the record. (In other words, I want to create an edit screen where the previously stored values are preselected in this control.) Any thoughts on what I may be doing wrong? The code for my select follows: (Note that ViewGrid is a grid from which the user previously selected this record. I've also tried doing this from a query with the same result - nothing is selected.) cfselect name="FinanceType" size="2" selected="#ViewGrid.FinanceType#" multiple option value="Single Family Housing"Single Family Housing/option option value="501(c)(3)"501(c)(3)/option option value="Hospital Revenue"Hospital Revenue/option option value="Leasehold Revenue"Leasehold Revenue/option option value="Multifamily Housing"Multifamily Housing/option option value="General Obligation"General Obligation/option option value="NID"NID/option option value="Special Obligation"Special Obligation/option option value="Industrial Development"Industrial Development/option option value="TIF"TIF/option option value="TDD/TC"TDD/TC/option option value="Other"Other/option /cfselect -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: Multiple value Select
OK. I have another application where I do in fact use a table for the lookup. I've tried to use your example and apply it here. But nothing is selected. My code is as follows: cfquery datasource="FirmDirectory" name="EditNameQry" Select * from Employees where ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select * from PracticeGroups order by PG /cfquery cfselect name="NewPG" size="3" multiple CFLoop query="GetPG" CFIF ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"cfoutput#PG#/cfoutput/option /cfloop /cfselect Note that if I replace the : CFIF ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) with: CFIF ListContains(GetPG.PG,"Agribusiness") Then Agribusiness is in fact selected. So I'm assuming there's something wrong with that one line. Do you happen to see where I went wrong? TIA, Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 7:44 AM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select I did this sort of thing for an intranet i'm working on with selected company newsgroups... The best way to do it is with a database of your finance types. This will allow you to updae the select statement without changing the hard coding. So the form will always be right. Query that database and the user database. In the user database, you will want to save a comma delimited list of the finance types they are assigned for. When you bring up the select, you can scroll through all the finance types, and if the user had any in his/her list, they will set the FinanceSelected variable to 'selected.' if they're not in the list, FinanceSelected will be blank. Hope this helps... CFQuery Name="GetFinances" datasource="#Application.datasource#" SELECTFinanceName FROM tblFinances ORDER By FinanceName /CFQuery CFQuery Name="GetCustomer" datasource="#Application.datasource#" SELECTCustomerName, Address, Finances!--- This Field is a comma delimited list of the user's finances --- FROM tblCustomers WHERE CustomerID = #Attributes.CustomerID# /cfgquery Finances:br Select Name="Finances" size="#GetFinances.RecordCount#" multiple CFLoop query="Finances" CFIF ListContains(GetCustomer.Finances,#FinanceName#) CFSET FinanceSelected = "Selected" CFELSE CFSET FinanceSelected = "" /cfif Option #FiannceSelected# value="#FinanceName#"#FinanceName#/option /cfloop /select Mark Armendariz Righteous Design www.sorighteous.com [EMAIL PROTECTED] -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Monday, August 07, 2000 6:34 PM To: [EMAIL PROTECTED] Subject: Multiple value Select I'm trying to set up a CFSELECT using the SELECTED option. I need to have the CFSELECT set up as multiple since more than one option is permitted. However, I can never seem to get the SELECTED option to properly highlight the options that are already stored in the record. (In other words, I want to create an edit screen where the previously stored values are preselected in this control.) Any thoughts on what I may be doing wrong? The code for my select follows: (Note that ViewGrid is a grid from which the user previously selected this record. I've also tried doing this from a query with the same result - nothing is selected.) cfselect name="FinanceType" size="2" selected="#ViewGrid.FinanceType#" multiple option value="Single Family Housing"Single Family Housing/option option value="501(c)(3)"501(c)(3)/option option value="Hospital Revenue"Hospital Revenue/option option value="Leasehold Revenue"Leasehold Revenue/option option value="Multifamily Housing"Multifamily Housing/option option value="General Obligation"General Obligation/option option value="NID"NID/option option value="Special Obligation"Special Obligation/option option value="Industrial Development"Industrial Development/option option value="TIF"TIF/option option value="TDD/TC"TDD/TC/option option value="Other"Other/option /cfselect -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or se
RE: Multiple value Select
Thanks for the quick response. Tried that and no luck. Athelene -Original Message- From: David E. Crawford [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 12:10 PM To: [EMAIL PROTECTED] Subject: Re: Multiple value Select This is a multi-part message in MIME format. --=_NextPart_000_0242_01C0015B.7347C930 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: Multiple value SelectSee if changing: ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) to ListContains(GetPG.PG,EditNameQry.PracticeGroup) Makes a difference. The # signs are not required inside CF functions. DC - Original Message -=20 From: Gieseman, Athelene=20 To: '[EMAIL PROTECTED]'=20 Sent: Tuesday, August 08, 2000 17:03 Subject: RE: Multiple value Select OK. I have another application where I do in fact use a table for the = lookup. I've tried to use your example and apply it here. But = nothing is=20 selected. My code is as follows:=20 cfquery datasource=3D"FirmDirectory" name=3D"EditNameQry"=20 Select * from Employees where ID=3D'#EditGrid.ID#'=20 /cfquery=20 cfquery datasource=3D"FirmDirectory" name=3D"GetPG"=20 Select * from PracticeGroups order by PG=20 /cfquery=20 cfselect name=3D"NewPG" size=3D"3" multiple=20 CFLoop query=3D"GetPG"=20 CFIF=20 ListContains(GetPG.PG,#EditNameQry.PracticeGroup#)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected#=20 value=3D"#PG#"cfoutput#PG#/cfoutput/option=20 /cfloop=20 /cfselect=20 Note that if I replace the : CFIF=20 ListContains(GetPG.PG,#EditNameQry.PracticeGroup#)=20 with: CFIF ListContains(GetPG.PG,"Agribusiness")=20 Then Agribusiness is in fact selected. So I'm assuming there's = something=20 wrong with that one line. Do you happen to see where I went wrong?=20 TIA,=20 Athelene=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 7:44 AM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 I did this sort of thing for an intranet i'm working on with selected=20 company newsgroups... The best way to do it is with a database of your = finance types. This will allow you to updae the select statement = without=20 changing the hard coding. So the form will always be right. Query = that=20 database and the user database. In the user database, you will want = to save=20 a comma delimited list of the finance types they are assigned for. = When you=20 bring up the select, you can scroll through all the finance types, and = if=20 the user had any in his/her list, they will set the FinanceSelected = variable=20 to 'selected.' if they're not in the list, FinanceSelected will be = blank.=20 Hope this helps...=20 CFQuery Name=3D"GetFinances" datasource=3D"#Application.datasource#" = SELECTFinanceName=20 FROM tblFinances=20 ORDER By FinanceName=20 /CFQuery=20 CFQuery Name=3D"GetCustomer" datasource=3D"#Application.datasource#" = SELECTCustomerName,=20 Address,=20 Finances!--- This Field is a comma delimited = list=20 of the user's=20 finances ---=20 FROM tblCustomers=20 WHERE CustomerID =3D #Attributes.CustomerID#=20 /cfgquery=20 Finances:br=20 Select Name=3D"Finances" size=3D"#GetFinances.RecordCount#" multiple = CFLoop query=3D"Finances"=20 CFIF ListContains(GetCustomer.Finances,#FinanceName#)=20 CFSET FinanceSelected =3D "Selected"=20 CFELSE=20 CFSET FinanceSelected =3D ""=20 /cfif=20 Option #FiannceSelected# = value=3D"#FinanceName#"#FinanceName#/option=20 /cfloop=20 /select=20 Mark Armendariz=20 Righteous Design=20 www.sorighteous.com=20 [EMAIL PROTECTED]=20 -Original Message-=20 From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]]=20 Sent: Monday, August 07, 2000 6:34 PM=20 To: [EMAIL PROTECTED]=20 Subject: Multiple value Select=20 I'm trying to set up a CFSELECT using the SELECTED option. I need to = have=20 the CFSELECT set up as multiple since more than one option is = permitted.=20 However, I can never seem to get the SELECTED option to properly = highlight=20 the options that are already stored in the record. (In other words, I = want=20 to create an edit screen where the previously stored values are = preselected=20 in
Re: Multiple value Select
This is a multi-part message in MIME format. --=_NextPart_000_0242_01C0015B.7347C930 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: Multiple value SelectSee if changing: ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) to ListContains(GetPG.PG,EditNameQry.PracticeGroup) Makes a difference. The # signs are not required inside CF functions. DC - Original Message -=20 From: Gieseman, Athelene=20 To: '[EMAIL PROTECTED]'=20 Sent: Tuesday, August 08, 2000 17:03 Subject: RE: Multiple value Select OK. I have another application where I do in fact use a table for the = lookup. I've tried to use your example and apply it here. But = nothing is=20 selected. My code is as follows:=20 cfquery datasource=3D"FirmDirectory" name=3D"EditNameQry"=20 Select * from Employees where ID=3D'#EditGrid.ID#'=20 /cfquery=20 cfquery datasource=3D"FirmDirectory" name=3D"GetPG"=20 Select * from PracticeGroups order by PG=20 /cfquery=20 cfselect name=3D"NewPG" size=3D"3" multiple=20 CFLoop query=3D"GetPG"=20 CFIF=20 ListContains(GetPG.PG,#EditNameQry.PracticeGroup#)=20 CFSET PGSelected =3D "Selected"=20 CFELSE=20 CFSET PGSelected =3D ""=20 /cfif=20 Option #PGSelected#=20 value=3D"#PG#"cfoutput#PG#/cfoutput/option=20 /cfloop=20 /cfselect=20 Note that if I replace the : CFIF=20 ListContains(GetPG.PG,#EditNameQry.PracticeGroup#)=20 with: CFIF ListContains(GetPG.PG,"Agribusiness")=20 Then Agribusiness is in fact selected. So I'm assuming there's = something=20 wrong with that one line. Do you happen to see where I went wrong?=20 TIA,=20 Athelene=20 -Original Message-=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 7:44 AM=20 To: [EMAIL PROTECTED]=20 Subject: RE: Multiple value Select=20 I did this sort of thing for an intranet i'm working on with selected=20 company newsgroups... The best way to do it is with a database of your = finance types. This will allow you to updae the select statement = without=20 changing the hard coding. So the form will always be right. Query = that=20 database and the user database. In the user database, you will want = to save=20 a comma delimited list of the finance types they are assigned for. = When you=20 bring up the select, you can scroll through all the finance types, and = if=20 the user had any in his/her list, they will set the FinanceSelected = variable=20 to 'selected.' if they're not in the list, FinanceSelected will be = blank.=20 Hope this helps...=20 CFQuery Name=3D"GetFinances" datasource=3D"#Application.datasource#" = SELECTFinanceName=20 FROM tblFinances=20 ORDER By FinanceName=20 /CFQuery=20 CFQuery Name=3D"GetCustomer" datasource=3D"#Application.datasource#" = SELECTCustomerName,=20 Address,=20 Finances!--- This Field is a comma delimited = list=20 of the user's=20 finances ---=20 FROM tblCustomers=20 WHERE CustomerID =3D #Attributes.CustomerID#=20 /cfgquery=20 Finances:br=20 Select Name=3D"Finances" size=3D"#GetFinances.RecordCount#" multiple = CFLoop query=3D"Finances"=20 CFIF ListContains(GetCustomer.Finances,#FinanceName#)=20 CFSET FinanceSelected =3D "Selected"=20 CFELSE=20 CFSET FinanceSelected =3D ""=20 /cfif=20 Option #FiannceSelected# = value=3D"#FinanceName#"#FinanceName#/option=20 /cfloop=20 /select=20 Mark Armendariz=20 Righteous Design=20 www.sorighteous.com=20 [EMAIL PROTECTED]=20 -Original Message-=20 From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]]=20 Sent: Monday, August 07, 2000 6:34 PM=20 To: [EMAIL PROTECTED]=20 Subject: Multiple value Select=20 I'm trying to set up a CFSELECT using the SELECTED option. I need to = have=20 the CFSELECT set up as multiple since more than one option is = permitted.=20 However, I can never seem to get the SELECTED option to properly = highlight=20 the options that are already stored in the record. (In other words, I = want=20 to create an edit screen where the previously stored values are = preselected=20 in this control.) Any thoughts on what I may be doing wrong? The = code for=20 my select follows: (Note that ViewGrid is a grid from which the user=20 previously selected this record. I've also tried doing this from a = query=20 with the same re
Re: Multiple value Select
This is a multi-part message in MIME format. --=_NextPart_000_025D_01C0015C.FC0970B0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable RE: Multiple value SelectTry listfindnocase(getpg.pg,EditNameQry.PracticeGroup) and see if that works. - Original Message -=20 From: Gieseman, Athelene=20 To: '[EMAIL PROTECTED]'=20 Sent: Tuesday, August 08, 2000 17:09 Subject: RE: Multiple value Select Thanks for the quick response. Tried that and no luck. =20 Athelene=20 -Original Message-=20 From: David E. Crawford [mailto:[EMAIL PROTECTED]]=20 Sent: Tuesday, August 08, 2000 12:10 PM=20 To: [EMAIL PROTECTED]=20 Subject: Re: Multiple value Select=20 This is a multi-part message in MIME format.=20 --=3D_NextPart_000_0242_01C0015B.7347C930=20 Content-Type: text/plain;=20 charset=3D"Windows-1252"=20 Content-Transfer-Encoding: quoted-printable=20 RE: Multiple value SelectSee if changing:=20 ListContains(GetPG.PG,#EditNameQry.PracticeGroup#)=20 to=20 ListContains(GetPG.PG,EditNameQry.PracticeGroup)=20 Makes a difference. The # signs are not required inside CF functions. = DC=20 - Original Message -=3D20=20 From: Gieseman, Athelene=3D20=20 To: '[EMAIL PROTECTED]'=3D20=20 Sent: Tuesday, August 08, 2000 17:03=20 Subject: RE: Multiple value Select=20 OK. I have another application where I do in fact use a table for = the =3D=20 lookup. I've tried to use your example and apply it here. But =3D=20 nothing is=3D20=20 selected. My code is as follows:=3D20=20 cfquery datasource=3D3D"FirmDirectory" name=3D3D"EditNameQry"=3D20 = Select * from Employees where ID=3D3D'#EditGrid.ID#'=3D20=20 /cfquery=3D20=20 cfquery datasource=3D3D"FirmDirectory" name=3D3D"GetPG"=3D20=20 Select * from PracticeGroups order by PG=3D20=20 /cfquery=3D20=20 cfselect name=3D3D"NewPG" size=3D3D"3" multiple=3D20=20 CFLoop query=3D3D"GetPG"=3D20=20 CFIF=3D20=20 ListContains(GetPG.PG,#EditNameQry.PracticeGroup#)=3D20=20 CFSET PGSelected =3D3D "Selected"=3D20=20 CFELSE=3D20=20 CFSET PGSelected =3D3D ""=3D20=20 /cfif=3D20=20 Option #PGSelected#=3D20=20 value=3D3D"#PG#"cfoutput#PG#/cfoutput/option=3D20=20 /cfloop=3D20=20 /cfselect=3D20=20 Note that if I replace the : CFIF=3D20=20 ListContains(GetPG.PG,#EditNameQry.PracticeGroup#)=3D20=20 with: CFIF ListContains(GetPG.PG,"Agribusiness")=3D20=20 Then Agribusiness is in fact selected. So I'm assuming there's =3D=20 something=3D20=20 wrong with that one line. Do you happen to see where I went = wrong?=3D20=20 TIA,=3D20=20 Athelene=3D20=20 -Original Message-=3D20=20 From: Mark Armendariz [mailto:[EMAIL PROTECTED]]=3D20=20 Sent: Tuesday, August 08, 2000 7:44 AM=3D20=20 To: [EMAIL PROTECTED]=3D20=20 Subject: RE: Multiple value Select=3D20=20 I did this sort of thing for an intranet i'm working on with = selected=3D20=20 company newsgroups... The best way to do it is with a database of = your =3D=20 finance types. This will allow you to updae the select statement = =3D=20 without=3D20=20 changing the hard coding. So the form will always be right. Query = =3D=20 that=3D20=20 database and the user database. In the user database, you will want = =3D=20 to save=3D20=20 a comma delimited list of the finance types they are assigned for. = =3D=20 When you=3D20=20 bring up the select, you can scroll through all the finance types, = and =3D=20 if=3D20=20 the user had any in his/her list, they will set the FinanceSelected = =3D=20 variable=3D20=20 to 'selected.' if they're not in the list, FinanceSelected will be = =3D=20 blank.=3D20=20 Hope this helps...=3D20=20 CFQuery Name=3D3D"GetFinances" = datasource=3D3D"#Application.datasource#" =3D=20 SELECTFinanceName=3D20=20 FROM tblFinances=3D20=20 ORDER By FinanceName=3D20=20 /CFQuery=3D20=20 CFQuery Name=3D3D"GetCustomer" = datasource=3D3D"#Application.datasource#" =3D=20 SELECTCustomerName,=3D20=20 Address,=3D20=20 Finances!--- This Field is a comma = delimited =3D=20 list=3D20=20 of the user's=3D20=20 finances ---=3D20=20 FROM tblCustomers=3D20=20 WHERE CustomerID =3D3D #Attributes.CustomerID#=3D20=20 /cfgquery=3D20=20 Finances:br=3D20=20 Select Name=3D3D"Fi
RE: Multiple value Select
Try replacing the cfloop with cfoutput like so: cfquery datasource="FirmDirectory" name="EditNameQry" Select* FROM Employees WHERE ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select* FROM PracticeGroups ORDER BY PG /cfquery cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option /cfoutput /cfselect I had the CFLoop in there because i had cfoutputs around it in my code... this should do it for you, if not, let me know... -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:03 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select OK. I have another application where I do in fact use a table for the lookup. I've tried to use your example and apply it here. But nothing is selected. My code is as follows: cfquery datasource="FirmDirectory" name="EditNameQry" Select * from Employees where ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select * from PracticeGroups order by PG /cfquery cfselect name="NewPG" size="3" multiple CFLoop query="GetPG" CFIF ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"cfoutput#PG#/cfoutput/option /cfloop /cfselect Note that if I replace the : CFIF ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) with: CFIF ListContains(GetPG.PG,"Agribusiness") Then Agribusiness is in fact selected. So I'm assuming there's something wrong with that one line. Do you happen to see where I went wrong? TIA, Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 7:44 AM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select I did this sort of thing for an intranet i'm working on with selected company newsgroups... The best way to do it is with a database of your finance types. This will allow you to updae the select statement without changing the hard coding. So the form will always be right. Query that database and the user database. In the user database, you will want to save a comma delimited list of the finance types they are assigned for. When you bring up the select, you can scroll through all the finance types, and if the user had any in his/her list, they will set the FinanceSelected variable to 'selected.' if they're not in the list, FinanceSelected will be blank. Hope this helps... CFQuery Name="GetFinances" datasource="#Application.datasource#" SELECTFinanceName FROM tblFinances ORDER By FinanceName /CFQuery CFQuery Name="GetCustomer" datasource="#Application.datasource#" SELECTCustomerName, Address, Finances!--- This Field is a comma delimited list of the user's finances --- FROM tblCustomers WHERE CustomerID = #Attributes.CustomerID# /cfgquery Finances:br Select Name="Finances" size="#GetFinances.RecordCount#" multiple CFLoop query="Finances" CFIF ListContains(GetCustomer.Finances,#FinanceName#) CFSET FinanceSelected = "Selected" CFELSE CFSET FinanceSelected = "" /cfif Option #FiannceSelected# value="#FinanceName#"#FinanceName#/option /cfloop /select Mark Armendariz Righteous Design www.sorighteous.com [EMAIL PROTECTED] -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Monday, August 07, 2000 6:34 PM To: [EMAIL PROTECTED] Subject: Multiple value Select I'm trying to set up a CFSELECT using the SELECTED option. I need to have the CFSELECT set up as multiple since more than one option is permitted. However, I can never seem to get the SELECTED option to properly highlight the options that are already stored in the record. (In other words, I want to create an edit screen where the previously stored values are preselected in this control.) Any thoughts on what I may be doing wrong? The code for my select follows: (Note that ViewGrid is a grid from which the user previously selected this record. I've also tried doing this from a query with the same result - nothing is selected.) cfselect name="F
RE: Multiple value Select
Still no luck. I also added an rtrim function to each of the fields in that line. And I've tried David's suggestion of using listcontainsnocase. Still no luck. I also changed the code this way: CFIF listfindnocase(rtrim(getpg.pg),rtrim(EditNameQry.PracticeGroup)) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "Not Selected" /cfif Option #PGSelected# value="#PG#"cfoutput#PG# #PGSelected#/cfoutput/option so that I would be able to see if the PGSelected was being set at all. When I use this code, the output on all of the options has "Not Selected" after it. So I believe the problem is that the listcontains never finds a match. I've changed the database from a char to a varchar (based on earlier posts about that issue), edited all of the records in the file to eliminate any extra spaces at the end, used the rtrim function. And still it's not ever finding a match. I appreciate the continuing help! This one is making me crazy (well, more crazy than usual.) Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:34 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select Try replacing the cfloop with cfoutput like so: cfquery datasource="FirmDirectory" name="EditNameQry" Select* FROM Employees WHERE ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select* FROM PracticeGroups ORDER BY PG /cfquery cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option /cfoutput /cfselect I had the CFLoop in there because i had cfoutputs around it in my code... this should do it for you, if not, let me know... -Original Message----- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:03 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select OK. I have another application where I do in fact use a table for the lookup. I've tried to use your example and apply it here. But nothing is selected. My code is as follows: cfquery datasource="FirmDirectory" name="EditNameQry" Select * from Employees where ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select * from PracticeGroups order by PG /cfquery cfselect name="NewPG" size="3" multiple CFLoop query="GetPG" CFIF ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"cfoutput#PG#/cfoutput/option /cfloop /cfselect Note that if I replace the : CFIF ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) with: CFIF ListContains(GetPG.PG,"Agribusiness") Then Agribusiness is in fact selected. So I'm assuming there's something wrong with that one line. Do you happen to see where I went wrong? TIA, Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 7:44 AM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select I did this sort of thing for an intranet i'm working on with selected company newsgroups... The best way to do it is with a database of your finance types. This will allow you to updae the select statement without changing the hard coding. So the form will always be right. Query that database and the user database. In the user database, you will want to save a comma delimited list of the finance types they are assigned for. When you bring up the select, you can scroll through all the finance types, and if the user had any in his/her list, they will set the FinanceSelected variable to 'selected.' if they're not in the list, FinanceSelected will be blank. Hope this helps... CFQuery Name="GetFinances" datasource="#Application.datasource#" SELECTFinanceName FROM tblFinances ORDER By FinanceName /CFQuery CFQuery Name="GetCustomer" datasource="#Application.datasource#" SELECTCustomerName, Address, Finances!--- This Field is a comma delimited list of the user's finances --- FROM tblCustomers WHERE CustomerID = #Attributes.CustomerID# /cfgquery Finances:br Select Name="Finances" size="#GetFinances.RecordCount#" mu
RE: Multiple value Select
take the cfoutput tags out of the options and put them within the entire select tag: cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" !--- OPENING CFOUTPUT --- CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option !--- NO CFOUTPUTS --- /cfoutput !--- CLOSING CFOUTPUT --- /cfselect -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:44 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select Still no luck. I also added an rtrim function to each of the fields in that line. And I've tried David's suggestion of using listcontainsnocase. Still no luck. I also changed the code this way: CFIF listfindnocase(rtrim(getpg.pg),rtrim(EditNameQry.PracticeGroup)) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "Not Selected" /cfif Option #PGSelected# value="#PG#"cfoutput#PG# #PGSelected#/cfoutput/option so that I would be able to see if the PGSelected was being set at all. When I use this code, the output on all of the options has "Not Selected" after it. So I believe the problem is that the listcontains never finds a match. I've changed the database from a char to a varchar (based on earlier posts about that issue), edited all of the records in the file to eliminate any extra spaces at the end, used the rtrim function. And still it's not ever finding a match. I appreciate the continuing help! This one is making me crazy (well, more crazy than usual.) Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:34 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select Try replacing the cfloop with cfoutput like so: cfquery datasource="FirmDirectory" name="EditNameQry" Select* FROM Employees WHERE ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select* FROM PracticeGroups ORDER BY PG /cfquery cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option /cfoutput /cfselect I had the CFLoop in there because i had cfoutputs around it in my code... this should do it for you, if not, let me know... -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:03 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select OK. I have another application where I do in fact use a table for the lookup. I've tried to use your example and apply it here. But nothing is selected. My code is as follows: cfquery datasource="FirmDirectory" name="EditNameQry" Select * from Employees where ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select * from PracticeGroups order by PG /cfquery cfselect name="NewPG" size="3" multiple CFLoop query="GetPG" CFIF ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"cfoutput#PG#/cfoutput/option /cfloop /cfselect Note that if I replace the : CFIF ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) with: CFIF ListContains(GetPG.PG,"Agribusiness") Then Agribusiness is in fact selected. So I'm assuming there's something wrong with that one line. Do you happen to see where I went wrong? TIA, Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 7:44 AM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select I did this sort of thing for an intranet i'm working on with selected company newsgroups... The best way to do it is with a database of your finance types. This will allow you to updae the select statement without changing the hard coding. So the form will always be right. Query that database and the user database. In the user database, you will want to save a comma delimited list of the finance types they are assigned for. When you bring up the select, you can scroll through all the finance types, and if the user had
RE: Multiple value Select
No luck. I think there's a problem in that the listcontains isn't finding any matches. I can't figure out why. I display the previously selected items in another part of the form and it is identical to the options in the database. There is a comma separating the selected items. For example, the record viewed via SQL shows: "Agribusiness,Commercial Litigation" (less the quotes) in the field. Both of those practice groups are identically listed in the GetPG.PG list. Yet neither of them are showing up selected in the control. Plus, if I replace CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) with CFIF ListContains(GetPG.PG,"Agribusiness") the Agribusiness option is selected. So I think I'm doing something wrong in how I'm using the second parameter of the ListContains. Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:00 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select take the cfoutput tags out of the options and put them within the entire select tag: cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" !--- OPENING CFOUTPUT --- CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option !--- NO CFOUTPUTS --- /cfoutput !--- CLOSING CFOUTPUT --- /cfselect -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:44 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select Still no luck. I also added an rtrim function to each of the fields in that line. And I've tried David's suggestion of using listcontainsnocase. Still no luck. I also changed the code this way: CFIF listfindnocase(rtrim(getpg.pg),rtrim(EditNameQry.PracticeGroup)) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "Not Selected" /cfif Option #PGSelected# value="#PG#"cfoutput#PG# #PGSelected#/cfoutput/option so that I would be able to see if the PGSelected was being set at all. When I use this code, the output on all of the options has "Not Selected" after it. So I believe the problem is that the listcontains never finds a match. I've changed the database from a char to a varchar (based on earlier posts about that issue), edited all of the records in the file to eliminate any extra spaces at the end, used the rtrim function. And still it's not ever finding a match. I appreciate the continuing help! This one is making me crazy (well, more crazy than usual.) Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:34 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select Try replacing the cfloop with cfoutput like so: cfquery datasource="FirmDirectory" name="EditNameQry" Select* FROM Employees WHERE ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select* FROM PracticeGroups ORDER BY PG /cfquery cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option /cfoutput /cfselect I had the CFLoop in there because i had cfoutputs around it in my code... this should do it for you, if not, let me know... -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:03 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select OK. I have another application where I do in fact use a table for the lookup. I've tried to use your example and apply it here. But nothing is selected. My code is as follows: cfquery datasource="FirmDirectory" name="EditNameQry" Select * from Employees where ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select * from PracticeGroups order by PG /cfquery cfselect name="NewPG" size="3" multiple CFLoop query="GetPG" CFIF ListContains(GetPG.PG,#EditNameQry.PracticeGroup#) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"cfoutput#PG#/cfoutput/option /cfloop
RE: Multiple value Select
Yo may have a point.. try putting quotes around EditNameQry.PracticeGroup. Plus, if I replace CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) with CFIF ListContains(GetPG.PG,"Agribusiness") the Agribusiness option is selected. So I think I'm doing something wrong in how I'm using the second parameter of the ListContains. -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 4:18 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select No luck. I think there's a problem in that the listcontains isn't finding any matches. I can't figure out why. I display the previously selected items in another part of the form and it is identical to the options in the database. There is a comma separating the selected items. For example, the record viewed via SQL shows: "Agribusiness,Commercial Litigation" (less the quotes) in the field. Both of those practice groups are identically listed in the GetPG.PG list. Yet neither of them are showing up selected in the control. Plus, if I replace CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) with CFIF ListContains(GetPG.PG,"Agribusiness") the Agribusiness option is selected. So I think I'm doing something wrong in how I'm using the second parameter of the ListContains. Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:00 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select take the cfoutput tags out of the options and put them within the entire select tag: cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" !--- OPENING CFOUTPUT --- CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option !--- NO CFOUTPUTS --- /cfoutput !--- CLOSING CFOUTPUT --- /cfselect -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:44 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select Still no luck. I also added an rtrim function to each of the fields in that line. And I've tried David's suggestion of using listcontainsnocase. Still no luck. I also changed the code this way: CFIF listfindnocase(rtrim(getpg.pg),rtrim(EditNameQry.PracticeGroup)) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "Not Selected" /cfif Option #PGSelected# value="#PG#"cfoutput#PG# #PGSelected#/cfoutput/option so that I would be able to see if the PGSelected was being set at all. When I use this code, the output on all of the options has "Not Selected" after it. So I believe the problem is that the listcontains never finds a match. I've changed the database from a char to a varchar (based on earlier posts about that issue), edited all of the records in the file to eliminate any extra spaces at the end, used the rtrim function. And still it's not ever finding a match. I appreciate the continuing help! This one is making me crazy (well, more crazy than usual.) Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:34 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select Try replacing the cfloop with cfoutput like so: cfquery datasource="FirmDirectory" name="EditNameQry" Select* FROM Employees WHERE ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select* FROM PracticeGroups ORDER BY PG /cfquery cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option /cfoutput /cfselect I had the CFLoop in there because i had cfoutputs around it in my code... this should do it for you, if not, let me know... -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:03 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select OK. I have another application where I do in fact use a table for the lookup. I've tried to use your example and apply it here. But nothing is selected. My code is as follows: cfquery datasource="FirmDirectory" name="EditNameQry" Select * from Employees where ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select
RE: Multiple value Select
This may be a stupid question but the query EditNameQry is only pulling one value for PracticeGroup. Right? If not I'm sure that when you "view source" you'll see that more than one option is "SELECTED". That will confuse the browser and it will stay on the first option. --K -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 2:04 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select Yo may have a point.. try putting quotes around EditNameQry.PracticeGroup. Plus, if I replace CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) with CFIF ListContains(GetPG.PG,"Agribusiness") the Agribusiness option is selected. So I think I'm doing something wrong in how I'm using the second parameter of the ListContains. -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 4:18 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select No luck. I think there's a problem in that the listcontains isn't finding any matches. I can't figure out why. I display the previously selected items in another part of the form and it is identical to the options in the database. There is a comma separating the selected items. For example, the record viewed via SQL shows: "Agribusiness,Commercial Litigation" (less the quotes) in the field. Both of those practice groups are identically listed in the GetPG.PG list. Yet neither of them are showing up selected in the control. Plus, if I replace CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) with CFIF ListContains(GetPG.PG,"Agribusiness") the Agribusiness option is selected. So I think I'm doing something wrong in how I'm using the second parameter of the ListContains. Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:00 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select take the cfoutput tags out of the options and put them within the entire select tag: cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" !--- OPENING CFOUTPUT --- CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option !--- NO CFOUTPUTS --- /cfoutput !--- CLOSING CFOUTPUT --- /cfselect -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:44 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select Still no luck. I also added an rtrim function to each of the fields in that line. And I've tried David's suggestion of using listcontainsnocase. Still no luck. I also changed the code this way: CFIF listfindnocase(rtrim(getpg.pg),rtrim(EditNameQry.PracticeGroup)) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "Not Selected" /cfif Option #PGSelected# value="#PG#"cfoutput#PG# #PGSelected#/cfoutput/option so that I would be able to see if the PGSelected was being set at all. When I use this code, the output on all of the options has "Not Selected" after it. So I believe the problem is that the listcontains never finds a match. I've changed the database from a char to a varchar (based on earlier posts about that issue), edited all of the records in the file to eliminate any extra spaces at the end, used the rtrim function. And still it's not ever finding a match. I appreciate the continuing help! This one is making me crazy (well, more crazy than usual.) Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:34 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select Try replacing the cfloop with cfoutput like so: cfquery datasource="FirmDirectory" name="EditNameQry" Select* FROM Employees WHERE ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select* FROM PracticeGroups ORDER BY PG /cfquery cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option /cfoutput /cfselect I had the CFLoop in there because i had cfoutputs around it in my code... this should do it for you, if not, let me know... -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday,
RE: Multiple value Select
No. That field would have multiple items in a comma-delimited format. Not even the first option is selected. Athelene -Original Message- From: Chapman, Katrina [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 4:33 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select This may be a stupid question but the query EditNameQry is only pulling one value for PracticeGroup. Right? If not I'm sure that when you "view source" you'll see that more than one option is "SELECTED". That will confuse the browser and it will stay on the first option. --K -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 2:04 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select Yo may have a point.. try putting quotes around EditNameQry.PracticeGroup. Plus, if I replace CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) with CFIF ListContains(GetPG.PG,"Agribusiness") the Agribusiness option is selected. So I think I'm doing something wrong in how I'm using the second parameter of the ListContains. -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 4:18 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select No luck. I think there's a problem in that the listcontains isn't finding any matches. I can't figure out why. I display the previously selected items in another part of the form and it is identical to the options in the database. There is a comma separating the selected items. For example, the record viewed via SQL shows: "Agribusiness,Commercial Litigation" (less the quotes) in the field. Both of those practice groups are identically listed in the GetPG.PG list. Yet neither of them are showing up selected in the control. Plus, if I replace CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) with CFIF ListContains(GetPG.PG,"Agribusiness") the Agribusiness option is selected. So I think I'm doing something wrong in how I'm using the second parameter of the ListContains. Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:00 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select take the cfoutput tags out of the options and put them within the entire select tag: cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" !--- OPENING CFOUTPUT --- CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option !--- NO CFOUTPUTS --- /cfoutput !--- CLOSING CFOUTPUT --- /cfselect -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:44 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select Still no luck. I also added an rtrim function to each of the fields in that line. And I've tried David's suggestion of using listcontainsnocase. Still no luck. I also changed the code this way: CFIF listfindnocase(rtrim(getpg.pg),rtrim(EditNameQry.PracticeGroup)) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "Not Selected" /cfif Option #PGSelected# value="#PG#"cfoutput#PG# #PGSelected#/cfoutput/option so that I would be able to see if the PGSelected was being set at all. When I use this code, the output on all of the options has "Not Selected" after it. So I believe the problem is that the listcontains never finds a match. I've changed the database from a char to a varchar (based on earlier posts about that issue), edited all of the records in the file to eliminate any extra spaces at the end, used the rtrim function. And still it's not ever finding a match. I appreciate the continuing help! This one is making me crazy (well, more crazy than usual.) Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:34 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select Try replacing the cfloop with cfoutput like so: cfquery datasource="FirmDirectory" name="EditNameQry" Select* FROM Employees WHERE ID='#EditGrid.ID#' /cfquery cfquery datasource="FirmDirectory" name="GetPG" Select* FROM PracticeGroups ORDER BY PG /cfquery cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# va
RE: Multiple value Select
There is your problem. ListFind looks for the element, specified second, in the list, specified first. So what you're doing is searching for a list within a list. You'll probably never find it. What you're doing is this cfset List1 = "3,5,8,9,4,2,1,6" cfset List2 = "1,2,3" cfoutput#ListFind(list1, list2)#/cfoutput This will NEVER evaluate to true because it doesn't look for each individual list element but for the entire list. 1,2,3 doesn't exist in the first list. You have to loop over the second list. cfloop index="ii" list="#list2#" cfoutput#ListFind(list1, ii)#/cfoutput /cfloop That will return the values you're looking for. --K -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 2:36 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select No. That field would have multiple items in a comma-delimited format. Not even the first option is selected. Athelene -Original Message- From: Chapman, Katrina [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 4:33 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select This may be a stupid question but the query EditNameQry is only pulling one value for PracticeGroup. Right? If not I'm sure that when you "view source" you'll see that more than one option is "SELECTED". That will confuse the browser and it will stay on the first option. --K -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 2:04 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select Yo may have a point.. try putting quotes around EditNameQry.PracticeGroup. Plus, if I replace CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) with CFIF ListContains(GetPG.PG,"Agribusiness") the Agribusiness option is selected. So I think I'm doing something wrong in how I'm using the second parameter of the ListContains. -Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 4:18 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select No luck. I think there's a problem in that the listcontains isn't finding any matches. I can't figure out why. I display the previously selected items in another part of the form and it is identical to the options in the database. There is a comma separating the selected items. For example, the record viewed via SQL shows: "Agribusiness,Commercial Litigation" (less the quotes) in the field. Both of those practice groups are identically listed in the GetPG.PG list. Yet neither of them are showing up selected in the control. Plus, if I replace CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) with CFIF ListContains(GetPG.PG,"Agribusiness") the Agribusiness option is selected. So I think I'm doing something wrong in how I'm using the second parameter of the ListContains. Athelene -Original Message- From: Mark Armendariz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:00 PM To: [EMAIL PROTECTED] Subject: RE: Multiple value Select take the cfoutput tags out of the options and put them within the entire select tag: cfselect name="NewPG" size="3" multiple CFOutput query="GetPG" !--- OPENING CFOUTPUT --- CFIF ListContains(GetPG.PG,EditNameQry.PracticeGroup) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "" /cfif Option #PGSelected# value="#PG#"#PG#/option !--- NO CFOUTPUTS --- /cfoutput !--- CLOSING CFOUTPUT --- /cfselect -----Original Message- From: Gieseman, Athelene [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 3:44 PM To: '[EMAIL PROTECTED]' Subject: RE: Multiple value Select Still no luck. I also added an rtrim function to each of the fields in that line. And I've tried David's suggestion of using listcontainsnocase. Still no luck. I also changed the code this way: CFIF listfindnocase(rtrim(getpg.pg),rtrim(EditNameQry.PracticeGroup)) CFSET PGSelected = "Selected" CFELSE CFSET PGSelected = "Not Selected" /cfif Option #PGSelected# value="#PG#"cfoutput#PG# #PGSelected#/cfoutput/option so that I would be able to see if the PGSelected was being set at all. When I use this code, the output on all of the options has "Not Selected" after it. So I believe the problem is that the listcontains never finds a match. I've changed the database from a char to a varchar (based on earlier posts about that issue), edited all of the records in the file to eliminate any extra spaces at the end, used the rtrim function. And still it's not ever finding a match. I appreciate the continuing help! This one is making me crazy (well, more crazy than