What I am doing in a nutshell is I have a Category table for various
category types. The table is as follows.

Code, Name, Type

I then have a second table for profiles

ParentCode, ChildCode

I use these two tables for all of my dynamic pop up menus, check
boxes,...etc

For instance I  do a search off the parentcode with baseball and I get and
join code and childcode and I get

Glo,  Gloves
Bat, Bats
Bas, Bases

Now I have a profile manager that helps me link the various category types.
I want to make sure that Bats, and bases only fall under baseball but Gloves
could also fall under hockey.


So the second table could look like

BsBall, Glo
BsBall, Bat
BsBall, Bas
Hockey, Glo

When I go under the Glove category on my web site there is a listing  of all
of the sports types with a check box

Baseball  X
Hockey  X
Basketball  

This allows me to manage which sports the word gloves will appear. The Code
follows



The way I get the FinalArray Data is by merging two arrays. See attached
TCF. 

One with all of the sports.


BsBall, Baseball
Hockey, Hockey
BkBall, Basketball

And one that come from the profile search

BsBall, Baseball
Hockey, Hockey

Is merged into 

BsBall, Baseball, Checked
Hockey, Hockey, Checked
BkBall, Basketball


<@for stop="<@NUMROWS Array=FinalArray Scope=Local>">
  <tr> 
    <td class="Table" width="28%"><@var name=FinalArray[<@currow>,Name]
Scope=Local> </td>
    <td class="Table" width="28%">
      <input type="checkbox" name="Profile_<@var
name=FinalArray[<@currow>,Name] Scope=Local>" value="checked" <@var
name=FinalArray[<@currow>,Checked] Scope=Local>> </td>
    <td class="Table" width="44%">&nbsp; </td>
  </tr>
</@for>

This gives me a list of checkboxes with the ones in the profile checked.

Now when I want to change to profile I want pass, as an array, the checked
values. What I do now create a NUMROWSx3 array and then using the names of
the <@ARG> I do a for loop and get the following array (assuming the user
unchecked hockey and checked basketball

BsBall, Glo
BkBall, Glo

I then Delete off the profile table anything matching glove and insert the
above rows.

My question is doing a for loop "Over the name of of the <@ARG Profile_<@var
name=FinalArray[@@Local$I,Name] Scope=Local>> stupid? Is there a more
elegant way?

Thanks

Jose

on 8/12/2002 11:05 AM, Simon Boddy at [EMAIL PROTECTED] wrote:

> Hi Jose,
> 
> I'm not clear exactly what you want to do. When you say an array of
> checkboxes, checkboxes on forms return name value pairs like any other form
> input. 
> 
> What makes your checkboxes a group? Are they all named the same? If so, you
> can get an array of selected values using <@arg name=myCheckboxes
> type=array>. 
> 
> Of course you can use <@arg > tags inside your method, but this tightly
> couples the method to the particular form.
> 
> Does this help? You might need to elaborate.
> 
> Simon.
> 
> -----Original Message-----
> From: Jose Kuhn [mailto:[EMAIL PROTECTED]]
> Sent: 12 August 2002 15:40
> To: Multiple recipients of list witango-talk
> Subject: Witango-Talk: Passing checkbox "arrays" into a TCF
> 
> 
> When I have an array of checkboxes. I want to pass the checked values into a
> TCF. Right now I create and empty array and fill it with the checked values
> (using a for loop) and then pass it to the object.
> 
> Is there a more elegant way/?
> 
> 
> Jose
> 
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>               with unsubscribe witango-talk in the message body
> 
> 
> ********************************************************************
> This message is intended only for the use of the person(s) ("the intended
> recipient(s)") to whom it is addressed. It may contain information which is
> privileged and confidential within the meaning of applicable law. If you
> are not the intended recipient, please contact the sender as soon as
> possible. The views expressed in this communication may not necessarily
> be the views held by LGCSB (Local Government Computer Services Board).
> 
> Any attachments  have been checked by a virus scanner and appear to be
> clean.
> Please ensure that you also scan all messages, as LGCSB does not accept
> any liability for contamination or damage to your systems.
> 
> 
> ********************************************************************
> 
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>               with unsubscribe witango-talk in the message body

-- 
Webologies
150 Robinette Drive
Waynesville, NC 28786
828.627.1994

http://www.webologies.com

----------------------------------------------------------------------------
"You can't make an omelet without breaking eggs"  Boris Badenov
----------------------------------------------------------------------------

Attachment: ArrayFlag.tcf
Description: application/applefile

Attachment: ArrayFlag.tcf
Description: Binary data

Reply via email to