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

Multiple Inserts based on check box?

Participant ,
Aug 07, 2006 Aug 07, 2006

Copy link to clipboard

Copied

I have an insert form that depending on if checkboxes are checked, inserts the data. How can I insert a record for the number of check boxes checked?

Example:
CB 1 = Checked
CB 2 = Not Checked
CB 3 = Checked

So I need to insert a record for CB 1 and CB 2. How can I do this?

What I'm doing is tying a sales lead to the sales man selected. I'm using check boxes because I figured it was easiest but I'm open to suggestions.
TOPICS
Advanced techniques

Views

247

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
New Here ,
Aug 08, 2006 Aug 08, 2006

Copy link to clipboard

Copied

I think all your problem depends on how you named your checkboxes.

If you have given the same name for the checkboxes you will get the values onto the server as a list item...
and you can directly loop through the list for your Insert query... And the best part is that only the selected values will be transfered to the server. So you can just go on to insert the data with whatever value is returned from the client side.

And if you are using different names for the checkboxes you have to check ith with the FORM Structure.. Here also you have various functions available in CF to handle and retrieve values from the structure... I think StructFind function will be of gud use for you...


Have a great time with coding CF...
Shibu Narayanan

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
New Here ,
Aug 08, 2006 Aug 08, 2006

Copy link to clipboard

Copied

I think all your problem depends on how you named your checkboxes.

If you have given the same name for the checkboxes you will get the values onto the server as a list item...
and you can directly loop through the list for your Insert query... And the best part is that only the selected values will be transfered to the server. So you can just go on to insert the data with whatever value is returned from the client side.

And if you are using different names for the checkboxes you have to check ith with the FORM Structure.. Here also you have various functions available in CF to handle and retrieve values from the structure... I think StructFind function will be of gud use for you...


Have a great time with coding CF...
Shibu Narayanan

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
New Here ,
Aug 08, 2006 Aug 08, 2006

Copy link to clipboard

Copied

LATEST
I think all your problem depends on how you named your checkboxes.

If you have given the same name for the checkboxes you will get the values onto the server as a list item...
and you can directly loop through the list for your Insert query... And the best part is that only the selected values will be transfered to the server. So you can just go on to insert the data with whatever value is returned from the client side.

And if you are using different names for the checkboxes you have to check ith with the FORM Structure.. Here also you have various functions available in CF to handle and retrieve values from the structure... I think StructFind function will be of gud use for you...


Have a great time with coding CF...
Shibu Narayanan

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