• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dynamic Checkbox

Participant ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

I have a record set that returns 2 records and I need to show 15 checkboxes which are hand coded. if the either of the two values match one of the checkbox, i need to disable that checkbox and move on to the next

the problem with the attached code is it disables the first checkbox T-03 but it does not disbale T-06 like that is in the recordset which returns T-03, T-06

any ideas?
TOPICS
Advanced techniques

Views

386

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Nov 29, 2006 Nov 29, 2006
> I have a record set that returns 2 records

Try a slight variation ..
<cfset userNameList = valueList(getRSM.UserName)>
<cfif listFindNoCase(userNameList, "T-03") gt 0>
.. disabled..

Votes

Translate

Translate
Participant ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

Ok, I'm not quite sure what you are doing here. You are doing a comparison of the field to see if it is equal to a specific value?

If you have a comma delimited value why not do something like this

<cfif listFind(getRSM.Username, 'T-03')>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

> I have a record set that returns 2 records

Try a slight variation ..
<cfset userNameList = valueList(getRSM.UserName)>
<cfif listFindNoCase(userNameList, "T-03") gt 0>
.. disabled..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

LATEST
Thank you so much! I'm a ASP to CF newb and I played around with ValueList and could not get it right. I had four different versions of this going to see what would work, a loop, a query output, you name it I tried it but thank you very much ... swhoo!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

Mike - If you have a recordset that returns individual records use the valueList function to get the recordset into a comma delimited list. If you are returning a comma delimited field of values than you don't need to use the valueList.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation