Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7007 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have two fields, Date of Birth and Age.

The age is calculated by the date of birth with by calculation below:

Year( Status(CurrentDate) ) - Year( V Birth Date ) - (( Month( Status(CurrentDate) ) + Day( Status(CurrentDate) ) / 100 ) < ( Month( V Birth Date ) + Day( V Birth Date ) / 100))

Here is the issue:

If only the age is known, I want to be able to skip the Date of Birth and just enter the age.

Currently the age filed is non modifiable because of the calculation. Any suggestions would help.

Thanks

Posted

You need an AgeEst (estimate) field (number), then adjust your calculation thus:

If ( not V Birth Date , AgeEst ,

Year( Status(CurrentDate) ) - Year( V Birth Date ) - (( Month( Status(CurrentDate) ) + Day( Status(CurrentDate) ) / 100 ) < ( Month( V Birth Date ) + Day( V Birth Date ) / 100))

)

Keep in mind that their age will not keep updating (if based upon the age estimate field) as an unstored calculation will, and when Users see the Age calculation, they won't know whether it's a real age or an estimate. I suggest instead then that you plug in an estimate date into V Birth Date and have a simple checkbox of 'Estimate'. At least it will update each year.

LaRetta

Posted

I'm suggesting they plug in a date of birth as if they know it but also click a checkbox called 'Estimate'. It won't matter what month/day they enter (maybe have them enter January 1) because it will be inaccurate anyway. But if they know the age, they can calculate the year. At least in this way the age will keep updating each year.

Otherwise, when they plug in an age (and 3 years passes) how will you know WHEN that age was entered? It will be worthless information.

Posted

( Month( Status(CurrentDate) ) + Day( Status(CurrentDate) ) / 100 ) < ( Month( V Birth Date ) + Day( V Birth Date ) / 100)

This is overkill, since the dates are stored as intergers behind the screens is all it takes:

Status(CurrentDate) < V Birth Date

--sd

Posted

Status(CurrentDate) < V Birth Date

You're missing the point here, Soren. Your suggestion will always produce false because it includes the year. The calculation must be broken into Month, Day and Year. The boolean test at the end adjusts the calculation properly, depending upon whether the month/day (of the birth date) has passed within the current year. If you search this Forum for multiple discussions by Comment, -Queue-, CobaltSky and others, you will find this discussed repeatedly. :wink2:

LaRetta

Posted (edited)

I do not care about what time will do to the data, just that if age is known but DOB is not, that the user can input the age in the same field V_Age that contains the calculation.

The field does not allow me to modify it. That is what I am trying to get around. I do not want to create a new field that shows Est_DOB etc...

Thanks

Edited by Guest

This topic is 7007 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.