I have three databases which are somewhat relational. In one, people can record activity or exercise performed during the day and, in another, I have it pulling the total amount of time spent in exercise for that date into a food journal. Only problem is, I have it pulling for "today"...if a person enters an activity journal and a food journal on 1/15 then updates or modifies the food journal on 1/16, the activity time no longer defaults in because that journal entry's date no longer equals "today".
This is the subroutine in db.cgi:
Then, in the html.pl file, in sub html_record_form, I have the following:
I have tried various and sundry forms of $in{'Date'} (which is the field I'm trying to grab a value from) with no success.
What it seems like I need this to do is define the value of the Date field of the current record (if I'm modifying) and search the activity journal for a match OR, if there's no value, search the activity journal for a match on "today" (because the new record hasn't yet been added, therefore the field has no value yet).
Am I missing something? Is there an easier way to do this? And how do I obtain the value of a field in a current record?
I'd appreciate any help on this...I'm getting some complaints from folks that their data is disappearing. Thanks!
Melanie
http://www.somemoorecats.com/
http://www.okhima.org/
This is the subroutine in db.cgi:
Then, in the html.pl file, in sub html_record_form, I have the following:
I have tried various and sundry forms of $in{'Date'} (which is the field I'm trying to grab a value from) with no success.
What it seems like I need this to do is define the value of the Date field of the current record (if I'm modifying) and search the activity journal for a match OR, if there's no value, search the activity journal for a match on "today" (because the new record hasn't yet been added, therefore the field has no value yet).
Am I missing something? Is there an easier way to do this? And how do I obtain the value of a field in a current record?
I'd appreciate any help on this...I'm getting some complaints from folks that their data is disappearing. Thanks!
Melanie
http://www.somemoorecats.com/
http://www.okhima.org/