What I am doing is bring back information from a 30 column table and putting it into an array. The array is used to create a selection form using the unique id for the checkbox value. After the submit, I use the <@POSTARG NAME='a_userid' TYPE=ARRAY> to create an one column array of the checked selections.
What I am trying to do is to use the selected values to bring back data from the orignial array to create a confirmation page before I preform the next action. Since I already have the data in an array I thought I could use it. The <@union> tag won't work because it combines. The <@intersect> tag requires that the two arrays have the same number of columns. May be I should just use an another Direct DBMS action instead.
Ted
Looping through rows should be avoided in witango whenever another solution is possible. Row looping is an expensive task.
Try something like this, since it is a comma delimited list, you can turn into an array and filter. You can turn into array with the <@array> tag, or:
<@assign request$temp <@transpose <@tokenizer "<@var request$vdeletelist>" chars=",">>
<@! now you have a 1 column array with you items >
Then you can use <@union> to see where the arrays intersect.
--
Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
On May 4, 2005, at 12:01 PM, Ted Wolfley wrote:
I couldn't get this to work, I think it is because of a comma delimited list of values and contains uses only one value. I went with using a row loop inside another row loop.
ted
Try this
<@ASSIGN NAME="vconfirmlist" VALUE="<@FILTER ARRAY='varrayout' EXPR=” ‘@@request$vdeletelist’ contains #usrid>" SCOPE="request">
Might work, I did this once but cant find code
I am trying to <@filter> an array by using values already selected from the array. The sql equivalent is "select * from array where userid in (selected list)".
Can a list of values be used in the filter action?
<@ASSIGN NAME="vconfirmlist" VALUE="<@FILTER ARRAY='varrayout' EXPR='#usrid in (@@request$vdeletelist)'>" SCOPE="request">
@@request$vdeletelist has numeric values that are separated by commas and #usrid is a numeric column.
Ted Wolfley
Database/Internet Programmer
The Ogden Group of Rochester
phone: (585) 321 1060 x23
fax: (585) 321 0043
[EMAIL PROTECTED]
www.ogdengroup.com
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf