I have two tables connected in my grid which is based on a view. One table (called "Admin") lists the Date, Time, Location, etc. of a particular incident. The second table (called "Persons") lists all of the people associated with the incident.
Within the Persons table is a field for the person's DOB and AGE, but the AGE field is just a label, as I was originally calculating the AGE through a field rule on the back end, by using the AGE(DOB) formula. Then I realized I was doing this wrong, because anytime I had to recalculate the records, the person's age was changing, as it was based on the formula of subtracting the DOB from the current system date.
What I *should* have been doing, was calculating the person's age based on subtracting the DOB from the "Date of the Incident," (actually called "Daterep") so it would never change. That way, if someone prints an old report, and a person was 17 at the time of the incident, the person will still show up as 17 in the report, even though he may now be 21 or older.
But here's my problem, the "Date of Incident" (Daterep) is in the Admin table, and I can't see how to make that field rule work in the back end with the "Daterep" coming from a different table.
I can calculate it on the web screen using a calculated query definition, but I'm not sure how to get the actual age to submit to the AGE field so it will stay there. (I need the age data in the persons table because it is used to determine other conditional fields in reports, etc., so just showing it on the web screen is not enough.)
Within the Persons table is a field for the person's DOB and AGE, but the AGE field is just a label, as I was originally calculating the AGE through a field rule on the back end, by using the AGE(DOB) formula. Then I realized I was doing this wrong, because anytime I had to recalculate the records, the person's age was changing, as it was based on the formula of subtracting the DOB from the current system date.
What I *should* have been doing, was calculating the person's age based on subtracting the DOB from the "Date of the Incident," (actually called "Daterep") so it would never change. That way, if someone prints an old report, and a person was 17 at the time of the incident, the person will still show up as 17 in the report, even though he may now be 21 or older.
But here's my problem, the "Date of Incident" (Daterep) is in the Admin table, and I can't see how to make that field rule work in the back end with the "Daterep" coming from a different table.
I can calculate it on the web screen using a calculated query definition, but I'm not sure how to get the actual age to submit to the AGE field so it will stay there. (I need the age data in the persons table because it is used to determine other conditional fields in reports, etc., so just showing it on the web screen is not enough.)
Comment