| just a note, it is VERY important you always single quote the left and right sides of an _expression_, unless you are explicitly working with numbers.
<@if expr="'<@var array3>' contains '<@VAR name="pipelinelist[[<@currow>,1]>'"><@else>
--
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 Oct 23, 2006, at 10:09 PM, David Mark Weiss wrote: thanks to Robert and Stefan. I knew it could be done, because I did it before on an app where we checked for permissions this way. Every user had permissions and we checked to see if the app he requested was in his permissions array. I couldn't find it, but I did do this and it worked.
<@if expr="<@var array3> contains <@VAR name="pipelinelist[[<@currow>,1]>"><@else> <option value="<@VAR name="pipelinelist[[<@currow>,1]"><@VAR name="pipelinelist[[<@currow>,1]</option> </@if>
Obviously Stefans is more elegant.
<@if "!(@@array_var contains @@value)"> show value </@if>
I suppose the first line says, "if the array does not contain the value" then show value. I didn't know you could write it that way.
I just tried it and it works great. Thanks for the tip. So with can you always eliminate expr when using the <@if tags? Just put the stuff inside the quotes? Where else can you use the !(kdkdkdkd) notation to mean not? I knew != meant not equals, but I had never seen this.
Mark
On Oct 23, 2006, at 8:50 PM, Robert Garcia wrote: Yes, I see that, just looked at docs. Haven't used it that way, and it doesn't describe if and how it works on arrays with more than one column, and how to specify that column. Do you use it this way?
--
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 Oct 23, 2006, at 7:36 PM, Stefan Gonick wrote: Actually, contains does work on arrays.
At 09:44 PM 10/23/2006, you wrote: contains is a string function, not an array function. It checks if a piece of text is in another piece of text. Take a look at <@filter>
--
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 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/
On Oct 23, 2006, at 6:27 PM, David Mark Weiss wrote:
Hi,
I would as I create a dynamic "select " statement, i would like to see if the option value is IN an array. or if the array contains the field as I loop through.
I have tried:
<@if expr="<@var name="array2"> contains @@list[<@currow>, 1]"> do nothing <@else> <option value="@@list[<@currow>, 1]">@@list[<@currow>, 1]</option> </@if>
No Joy.
Can someone tell me what I am doing wrong?
Thanks for the help
Mark Weiss http://trustthechildren.blogspot.com
________________________________________________________________________
TO UNSUBSCRIBE: Go to
http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to
http://www.witango.com/developer/maillist.taf
===================================================== Database WebWorks: Dynamic web sites through database integration http://www.DatabaseWebWorks.com
CoachVille: For coaches and people taking teleclasses http :// www.cvcommunity.com?af=69474 ________________________________________________________________________
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
|