Write calculated field to another field

Hi. How can I wrute a calculated age field to another field in my Clarion 8 program

Sorry but that’s all quite vague.
You can certainly assign a field to another field A = B, But I’m guessing that’s not what you’re after.

Your question seems too simple…

File:AgeOfPerson = CalculatedValue

…?

If that doesn’t solve your problem, tell us a bit more about what you want.

SQL or TPS?
If ABC, you can override the filemanager insert and update methods to do what you want.
Or look into dictionary triggers.

Thanks Jane. I did ok with limited self-taught knowledge of Clarion 8 and using the Clarion templtes. I want to use the age output age result of the formula to create a sort key on age. I cannot create a sort key as the age field is calculated on the fly. I need to know how can I create a field equal to the age field i can use to generate a sort key. Bless you

SQL or TPS?

If SQL you can get the database to sort it using a VIEW.

If TPS you can create the field and key in the table. If you have existing data and you want to update it and create the key you could use a PROCESS procedure to scan the file and update the values.

Just sort on date of birth.

No need to calculate age for this as the lower the DOB the older they are.