Hi, currently I have a Type field for the age and I am thinking of having the age in the Type field to be automatically updated at the start of every year. But I am aint sure of how to get about it. Help please:) Thanks in advance.
Go to manage database. Create a date of birth field. Change your age field to be of type calculation. After you save the change to calculation enter this: Int((Get ( CurrentDate ) - Dob)/365)
Replace DateOfBirth with whatever your field is.
Instead of doing it that way, store the person's Date of Birth and have the age field as an unstored calculation that calculates their age by looking at the current date and their date of birth.
Int((Get ( CurrentDate ) - DateOfBirth)/365)
Sorry, I am quite new to filemaker, so do I type the codings into the script?
Also make sure that when you are specifying the calculation you click on Storage options on the bottom of the dialog and select unstored.
I was thinking of having a message box with the age is below 0. I tried using the if/else statement but it dont seem to work.
In the field options for your Date of birth field, go to the validation tab and then Validate by calculation and put this in there:
Self ≤ Get ( CurrentDate )
You can then display a custom message if the validation fails.
I wanted to include if the age is below 6 and above 21. The message box will pop out.This is my script: (Self ≤ Get ( CurrentDate ) ) and (6 ≤ Age ≤ 21) but it doesnt seem to work.
Self ≤ Get ( CurrentDate ) or Age < 6 or Age > 21
Thanks, it is solved after i tweak the formula.
Retrieving data ...