| Subject |
Re: How to calulate field value in a Grid? |
| From |
Mervyn Bick <invalid@invalid.invalid> |
| Date |
Fri, 30 Jul 2021 17:37:31 +0200 |
| Newsgroups |
dbase.getting-started |
On 2021/07/30 17:32, Mervyn Bick wrote:
> On 2021/07/30 16:42, Milind Nighojkar wrote:
>> Thanks for the reply Akshat,
>>
>> Aging and Estimated Field both are table fields...
>>
>> I am not aware how to add calulated fields in grid .....
>>
>> Any pointer what could be the code on Lost focus ?
>>
>> Regards
>> Milind Nighojkar
>
> If you include Aging as a field in the table you will need to update the
> values every time you run the program.
>
> You can place this code in the header section of your form i.e above the
> line to update the Aging field eachtime the form is run.
>
> ** END HEADER -- do not remove this line
>
> cDate = set('date')
> set date to american
> cmd = "update your_table_name set Aging = '"+dtoc(date())+"' -
> Estimated_Date"
> &cmd
> set date to &cDate
>
Umm. That is misleading. I added text in the wrong place.
Your form should look like
cDate = set('date')
set date to american
cmd = "update your_table_name set Aging = '"+dtoc(date())+"' -
Estimated_Date"
&cmd
set date to &cDate
** END HEADER -- do not remove this line
//
// Generated on 2020-10-12
//
parameter bModal
local f
........
Mervyn.
|
|