
lists at gmnet
Nov 21, 2009, 3:08 PM
Post #3 of 4
(882 views)
Permalink
|
|
Re: if explicit problem with data tag (SOLVED)
[In reply to]
|
|
On Sat, 2009-11-21 at 12:28 -0800, Daniel Browning wrote: > On Saturday 21 November 2009 11:36:56 am Rick Bragg wrote: > > [.if type=explicit compare="$Tag->data({ table => groups > > column => description, key => [data session arg], })"] ... > > Any ideas what the problem is? > > Here is what I suggest as a replacement: > > [if type=data term="groups::description::[data session arg]"] > > If you're curious why the first version didn't work, there are several > reasons. When you pass perl to a usertag, it helps to try executing that > perl by itself first to check for problems, like so: > > [perl] > return $Tag->data( > { > table => groups > column => description, > key => [data session arg], > } > ); > [/perl] > > That will show you the syntax errors (missing comma, unquoted literals, > table access). Here is the fixed code: > > [perl tables="groups"] > return $Tag->data( > { > table => 'groups', > column => 'description', > key => q{[data session arg]}, > } > ); > [/perl] > > Then you could package that up and put it back in the compare="" clause, if > you could not use this shorter version for some reason: > > [if type=data term="groups::description::[data session arg]"] > > HTH, > -- > Daniel Browning > End Point Corporation > http://www.endpoint.com/ > Yes Dan that did Help! My first try was: [if type=data term=groups::description::[scratch test]] (no quotes) That did not work, so I went to the perl thing, but now with: [if type=data term="groups::description::[scratch test]"] things work perfect. Thanks Rick -- This message has been scanned for viruses and dangerous content by Green Mountain Network, and is believed to be clean. _______________________________________________ interchange-users mailing list interchange-users [at] icdevgroup http://www.icdevgroup.org/mailman/listinfo/interchange-users
|