Hey Sean!

Its late(early?) and I'm having a somewhat difficult time following your
code. If I'm to understand correctly, you're creating a 29x1 array populated
with a single column from the database? Can you do the query and just pull
that column or are you bringing back other columns? If just one column, do
<@assign user$Cllr_Id value="<@var request$resultset>">

If more than one column, I think you can explicitly assign the array with
something like
<@assign  user$Cllr_Id value="<@var request$resultset[*,col_number]>">

In the event you can't do either of the above statements, you can try it
your way. Couple things. Be sure that on your first assign your doing an
<@assign user$Cllr_Id value="<@array value='<@column col_name>;' cdelim= ','
rdelim=';'>">
and then do your addrows. Each row you add has to be in the form of a
one-dimensional array, if I remember correctly. So you'll have to use the
<@array> tag again.

You can get the row count out of an array by <@numrows array="scope$name">

You REALLY should scope your variables. Not scoping is bad. Really bad.

If what I've stated is totally off-base I apologize.

Good luck!

Jonah Simpson
[EMAIL PROTECTED]

----- Original Message ----- 
From: "Sean Mulligan (Information Technology)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 5:12 AM
Subject: Witango-Talk: Array Problem!


| Hi All
|
| Has anyone any code / ideas on the following.
|
| I have a list of 29 records.  For each record, I have a dropdown with 3
| options Yes, No and Apologies.
|
| Will need to be able to go through each record and select either one of
the
| options, select
| save button once and have the 29 records inserted all at once.
|
| 1. Below, i'm building my array, using a Search action
|
| <@Rows>
| <@ASSIGN Name="User$Cllr_Id" Value="<@COLUMN
| 'TblCllrGroups.CllId'>">
| <@ADDROWS ARRAY="user$Councillor_Id" VALUE=@@user$Cllr_Id>
| <@Assign count value=<@calc expr='@@count + 1'>>
| </@rows>
|
|     Count Total Records :<@var count><BR>
|
| 2. I then have a For action looping from 1 to <@var count>
|
| 3. For each of the 29 records above, I need to see which option has been
| selected
|
| 4. Within the For loop I have a Search action with the below.
|
| <@ASSIGN i value=<@calc expr='@@user$i + 1'>>
| <@assign user$tempRefID <@VAR Councillor_Id[@@user$i,1]>>
|
|
| Cid:@@tempRefId<BR>
|     Count:@@i<BR>
|
| 5.  I also have in the For loop 3 If statements, If Yes, ElseIf No and
| ElseIf Apologies
|
| It is not picking up on the option selected within the dropdown for each
| record or the Cid (@@tempRefId).  I'm inseting value 1 for Yes, 0 for No
and
| -1 for Apologies. The only value being entered is the value of the first
| record on the list.
|
| From the above can anyone see where i'm going wrong?.
|
| Thanks
|
| Sean Mulligan
| I.T. Development Team
| Meath County Council
| Navan
| Co. Meath
|
|
|
| ________________________________________________________________________
| TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
|

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to