Subject | Re: Re tib_query 'invalidate calculated fields' |
---|---|
Author | comesailing@btinternet.com |
Post date | 2001-09-19T15:40:18Z |
OK I MUST STOP doing this! I ask for help then find the answer.
The trouble was an upper/lower case problem.
ALthough I said "calculatedfields add 'Avail' integer"
it seems the fieldname has to be all upper so I needed
if Afield.fieldname = 'AVAIL' not 'Avail' .Oh dear!
thanks and sorry
Dave
The trouble was an upper/lower case problem.
ALthough I said "calculatedfields add 'Avail' integer"
it seems the fieldname has to be all upper so I needed
if Afield.fieldname = 'AVAIL' not 'Avail' .Oh dear!
thanks and sorry
Dave
--- In IBObjects@y..., comesailing@b... wrote:
> This does not seem to work as I expected.
>
> I have a tib_query with 2 calc fields, which are set up in program.
> I have an on_calculate field routine which says
> if (AField.fieldname = 'avail') then do somthing special.......
>
> and this is fine the first time I open the query.
>
> I later say 'invalidate calculated fields' expecting this to be met
> again but no!
>
> on inspection the on_calculate_field routine is met again but
> the 'afield' has no name the two fields seem to have field no -1 and
> -2 but I can't see a fieldname anywhere.
>
> Should I have used a different property of Afield rather than its
> fieldname ?