[ic] [if]???

Ed LaFrance interchange-users@interchange.redhat.com
Tue Jan 29 13:31:01 2002


At 10:33 AM 01/29/2002 -0600, you wrote:
> > That's right. This way it won't work.
> >
> > Try:
> >
> > [if term="25" op=">" compare="20"]Hello test is
> > okay.[else]Not
> > Okay.[/else][/if]
> >
> > [seti testme]2[/seti]
> > [if scratch testme > 1]Value of Scratch testme
> > ([scratch testme]) greater
> > than 1[/if]
> >
> > [if term="0404-LN" op=eq
> > compare="0404-LN"]Okay[else]Not Okay[/else][/if]
> >
> > [if type=scratch term=testme op=">"
> > compare=1]Yes[else][/else]No[/if]
> >
> > And read the docs.
> > 
> http://interchange.redhat.com/cgi-bin/ic/docfly.html?mv_arg=ictemplates05%2e05
> >
> >
> > Best
> >          Ton
> >
>
>Thank you Ton, but that can't solve my original problem to compare value 
>from CGI form to value retrived from database.

[if type=data term="table::column::key" op=eq compare="[cgi varname]"]
...
[/if]

Or, if within a loop search of the table from which a field value is to be 
compared to the cgi variable:

[loop search="
         fi=table
         st=type
         sf=search_field
         se=search_spec
         ...(more terms if you want)
"]

[if type=cgi term=varname op=eq compare="[loop-data table field]"]
...
[/if]

...you might even try this (don't know if it will parse correctly):

[if-loop-data table field eq [cgi varname]]
...
[/if-loop-data]


[/loop]


...And I am sure there are *many* other ways this cat could be skinned.

- Ed L.




>  And I read that document thousands of times.  Do you know the way to do 
> this?
>
>for example
>
>[if type="xxx" term="[loop-code]" op=eq compare="[cgi option_code"]
>you got it!
>[else]
>this is Interchange, pal!
>[/else]
>[/if]
>
>
>
>
>
>
>
>_______________________________________________
>interchange-users mailing list
>interchange-users@interchange.redhat.com
>http://interchange.redhat.com/mailman/listinfo/interchange-users

===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================