methods
Serge
sun2 at public.kherson.ua
Tue Aug 2 09:07:12 CDT 2005
Hi Chris,
> I've never really used field methods (is that the right term?)
> before, but I've come to a point where I need to implement one, and
> I'm totally clueless as to how to do it. I guess I just need a few
> examples or something of how exactly to make it work.
>
> I have a table called Classes with a field called ClassName of type
> VarChar and another called Reading of type Boolean. What I want to
> do is append a small string '(HR)' to those ClassNames where the
> field Reading has a false value. So in my method field I want
> something like:
>
> Concat(ClassName, ' (HR)') WHERE/IF Reading=false
>
> Is that possible? Is my syntax way off? I just haven't found much
> documentation on how to put together the calculations for method fields.
Yes, it is possible. You can look at our example in the folder
Examples/API_way/MethodCreate.
I think that you can use such a method:
"if( Reading=false, concat( ClassName, ' (HR)'), ClassName)"
--
Best regards,
Serge
More information about the Valentina
mailing list