Hi Dale,
Thanks for the assistance. I should have included my goal in the
original e-mail.
The idea here is to be able to filter an array by several arguments,
using OR. Ideally, this is how it would look when I'm finished:
<@assign request$newarray value='<@filter array="request$resultset"
expr="#1 = 99<@ifequal '<@ARG cw>' '1'> OR #1 = 112</@if><@ifequal
'<@ARG cd>' '1'> OR #1 = 113</@if><@ifequal '<@ARG ce>' '1'> OR #1 =
114</@if>">'>
I know that #1 would never be 99, so I put that in to start off the
expression, just in case all of the other arguments don't equal 1.
Then, there would always be something in the expression. That would
return an empty array, which is what I would want if all the other
arguments != 1.
Putting the <@ifequal> outside the <@assign> wouldn't work because I
need to be able to process the array using OR.
I know there are probably other ways to skin this cat, but I was just
confused as to why Witango wouldn't allow me to put <@ifequal> inside
the expr attribute.
Brian Humes
Director, Interactive
JohnsonRauhoff
269-428-9257 (direct)
269-428-3377 (main)
269-428-3312 (fax)
www.johnson-rauhoff.com
[EMAIL PROTECTED]
On Dec 14, 2007, at 6:31 AM, Dale Graham wrote:
Looks like a simple re-write would do the trick (and while I have
used meta tags inside the "expr" (e.g. <@length >) with success,
where <@arg cw> is not equal to 1, your usage would result in
<@assign request$newarray value='<@filter array="request
$resultset" expr="">'>
and a null expr is not going to work.
So you need to do this
<@ifequal '<@ARG cw>' '1'>
<@assign request$newarray value='<@filter array="request
$resultset" expr="#1 = 112">'>
<@else> (whatever you wanted to do where <@arg cw> not equal to 1)
</@if>
On Dec 13, 2007, at 3:05 PM, Brian Humes wrote:
Am I not allowed to do this?
<@assign request$newarray value='<@filter array="request
$resultset" expr="<@ifequal '<@ARG cw>' '1'>#1 = 112</@if>">'>
When I do (given cw=1 and resultset[1,1] is 107), I get:
Error during expression evaluation.
Statement end missing inside [107 = 112]
When I change it to this:
<@assign request$newarray value='<@filter array="request
$resultset" expr="#1 = 112">'>
works just fine.
Are we not supposed to use meta tags inside the expr parameter?
I've tried all manner of parens, quotes, etc. No luck.
Any help would be greatly appreciated. Thanks!
Brian Humes
Director, Interactive
JohnsonRauhoff
269-428-9257 (direct)
269-428-3377 (main)
269-428-3312 (fax)
www.johnson-rauhoff.com
[EMAIL PROTECTED]
_____________________________________________________________________
___
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
--------------
Dale Graham,PhD
Technical Manager, NIDB
Custom Applications Branch, DECA, NIH
[EMAIL PROTECTED]
______________________________________________________________________
__
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf