September 18, 200520 yr 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
September 18, 200520 yr 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
September 18, 200520 yr Author If the user does not know the DOB but has an estimate how can I get the age field to allow a modification? Thanks
September 18, 200520 yr 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.
September 18, 200520 yr ( 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
September 18, 200520 yr 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. LaRetta
September 19, 200520 yr Author 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 September 19, 200520 yr by Guest
Create an account or sign in to comment