Change Date to Use Current Date More Consequences

Discussions for the HanDBase for iPad and it's conduits and desktop add-ons

Change Date to Use Current Date More Consequences

Postby tmcmanus@fsci.ab.ca » Thu Jun 26, 2014 5:10 pm

I already posted the problem with changing the default of a date field to Use Current Date. I was going to restore the correct dates from an Excel CSV and tack on the 18 new entries at the end. Couldn't match the data. Then I noticed - the records had been sorted into Date Time order (I have a separate time field) so, with all records now having the same date, they are all sorted by the time field. I did not carry out a manual sort and I don't know how to set up the database to automatically sort into a specific, multiple field order, so I don't know how this happened. It's going to make recovery very difficult if not impossible thought! Any help in getting the records out in the original order would be much appreciated.
tmcmanus@fsci.ab.ca
 
Posts: 3
Joined: Thu Sep 01, 2011 1:30 am

Re: Change Date to Use Current Date More Consequences

Postby Brian_Houghton » Sat Jun 28, 2014 4:02 pm

tmcmanus@fsci.ab.ca wrote:I already posted the problem with changing the default of a date field to Use Current Date. I was going to restore the correct dates from an Excel CSV and tack on the 18 new entries at the end. Couldn't match the data. Then I noticed - the records had been sorted into Date Time order (I have a separate time field) so, with all records now having the same date, they are all sorted by the time field. I did not carry out a manual sort and I don't know how to set up the database to automatically sort into a specific, multiple field order, so I don't know how this happened. It's going to make recovery very difficult if not impossible thought! Any help in getting the records out in the original order would be much appreciated.


Hi,

Thanks for posting.

Sorry to read of the trouble you encountered with the date field.

When you use the "current date" parameter within a database, the date value does indeed get set to the present day. This is not a bug, but is rather by design. There are other parameters that may be more in line with what you are looking for, though, such as the ability to stamp the record with the date it was created or last edited. There is also the "ask user" parameter which means you get to select the date from a calendar.

The "current date" parameter is mostly useful for date based calculations where it is important to determine a date relative to the current date.

Regarding sorting within HanDBase, a database can be configured to sort in ascending or descending order based on up to three fields.

As for recovering your data, you might consider sorting in Excel based on time. You would then hopefully see the correct dates so you can modify the HanDBase database.


Sent from my Nexus 7 using Tapatalk HD
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: Change Date to Use Current Date More Consequences

Postby tmcmanus@fsci.ab.ca » Wed Jul 23, 2014 7:35 pm

I thought I understood the concept of current date. I have actually used it in another application to set it as the default just to avoid the extra steps of selecting the date, hitting Today and the Save to get the current date each time.

In an older database, I had been doing just this for a long time. So, since I had "discovered" an new and better way to do this, I thought I'd apply it to the old database.

My concern is that it changed all the historical data to the current date. Surely you can't be serious that this is by design. It just doesn't make sense to me. Such a designation should apply to the action to be taken when a new record is created. To apply it, all at once, to every historical record, without even a warning that this action will have dire consequences (potentially) doesn't strike me as good design.

I hope you will take my concerns into consideration and review the appropriateness of your response to this issue.

Thanks.
tmcmanus@fsci.ab.ca
 
Posts: 3
Joined: Thu Sep 01, 2011 1:30 am

Re: Change Date to Use Current Date More Consequences

Postby dhaupert » Wed Jul 23, 2014 9:06 pm

Hi,

We didn't always have the current date option in HanDBase. We had the Ask User which defaults to no date and never changes unless the user changes it. We also had the Date Record added behavior which is to set the date when the record is created to that current date but never touch it again, and we had the Date Record Modified, which updates whenever a record is modified. For 90% of the cases, these three behaviors should cover it, but some people wanted to do things like calculate the age of someone given only a birthdate. Since none of the above behaviors would update we needed a way to have a constant of the current date that could be used for this and the behavior 'Current Date' was designed out of that need. So now someone can add a field with this behavior and use it to subtract the birthdate and get a proper age, or to subtract some other date to find out the number of days an invoice is past due, for example.

So this field behavior serves a useful need, but obviously it's important to know what it does since it is going to change every date to the current date on every edit or view of a record. It's part of the design and necessary for things like calculating ages as above that it's always up to date on every record.

Hope this makes sense. I know it's of no consolation if you just changed the dates of existing records by mistake, but hopefully you have been syncing and/or creating backups of your data. I suggest doing that before making any structural changes to a database so that you can always go back if you need to.
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am


Return to HanDBase for iPad

Who is online

Users browsing this forum: No registered users and 1 guest

cron