SteveS Posted September 20, 2003 Posted September 20, 2003 Is there any way to auto enter the current date into a field without using a script. I have a training database that requires a date entry into various fields during the training period. It would make it alot easier if the curent date was inserted when the individual field was selected. I would appreciate any help on this matter. Steve
LaRetta Posted September 20, 2003 Posted September 20, 2003 ... curent date was inserted when the individual field was selected. Hi Steve, You might be able to use a plug-in, but otherwise, I believe you'd need to attach a script to each date field which would activate when the User clicks into it. Something like: If [isEmpty(DateField)] Set Field [DateField, Status(CurrentDate)] Else Go To Field [select/Perform, DateField] End If You could duplicate the script and change the field names to each of your different date fields you wish to set. In this way, it will insert the current date if User clicks the empty field but if the date field isn't empty, the User can still change it. Possibly there are other ways of addressing your problem. If you'd like to explain more, we might have more suggestions on how you can accomplish what you wish. For instance, using a calculation or ModificationDate; but, with the info you've given us, I think you'll need a script. Cheers, LaRetta
SteveS Posted September 20, 2003 Author Posted September 20, 2003 Thank you LaRetta, I have about 200 fields that I need to attach this script to, that is why I was looking for a way out.
LaRetta Posted September 20, 2003 Posted September 20, 2003 Hi Steve, If you have 200 fields that are date fields - for somehow tracking, then I would suggest that instead you use a related database and each date would become a record. If you can do this, you can use auto-enter on each date field and have a category for the type of date. If you're interested in considering alternative approaches, let us know your existing structure - or attach your db to a post and we can make some recommendations. Truly, 200 fields containing the date doesn't sound like the most efficient way to go, but I could be wrong. We wouldn't know unless we understand your strucuture. I would be happy to take a look for you. LaRetta
SteveS Posted September 20, 2003 Author Posted September 20, 2003 I have a section in a training program that I made that has approximately 600 fields. Example: Discussed Demonstrated Accomplished Acknowledged Question#1 is here. ----- [Field 1 ] [Field 2 ] [ Field 3 ] [Field 4 ] Question#2 is here. ----- [Field 5 ] [Field 6 ] [ Field 7 ] [Field 8 ] And it continues like this. I know that I should have made these fields repeating, however I made this program a while ago and wanted to revamp it.
LaRetta Posted September 20, 2003 Posted September 20, 2003 Hi Steve, 600 fields isn't very efficient. No, you shouldn't use repeating fields for this either but I instead again suggest you use a related database to track your information. If this is just for your personal use, I guess it's okay but even so, a simple related db would solve most of your problems by utilizing the power of relational. If you wish to stay with your existing structure, there are a few more things I could recommend but you'll still need to attach a script to each date field. If you have >= vs. 5.5, you could attach the same script to each field and use GetField to store the focused fieldname into a global and then use Set Field [global, Status(CurrentDate)] with that. Let me know your version. You could also use Specify Button and Insert Current Date, but you can not restrict Users to this field by deselecting 'Allow Entry Into Field'. Specify Button will not work if 'Allow Entry' is turned off. And if you allow entry, the date will be updated every time it's clicked ... which might be okay with you also. Cheers, LaRetta
LaRetta Posted September 20, 2003 Posted September 20, 2003 Hi Steve, If you're interested in a related approach, I have attached a bare-bones demo to show you what I meant about using a related db to hold your activities. There are many ways to accomplish this. It would eliminate the need of so many date fields. I removed the demo. It showed a basic relationship approach but, after reviewing Steve's database it isn't exactly what he needs.
SteveS Posted September 21, 2003 Author Posted September 21, 2003 Hi LaRetta, I would love to see the above demo but unfortunately, I could not open it because I have FilemakerPro 4.0.
SteveS Posted September 21, 2003 Author Posted September 21, 2003 Hi LaRetta, Please view my website at www.sammonsoftware.com and dowload the demo program. When the program opens up, go to the FUNCTIONS database. You will see what I want to change, instead of applying a value list for the fields, I wanted to insert the current date when the individual field is affected. You can e-mail me from this site if you wish. I appreciate your help with this issue. Thank You, Steve
SteveS Posted September 21, 2003 Author Posted September 21, 2003 LaRetta, I want to thank you for your advise and I will apply these functions. Sincerely, Steve
SteveS Posted September 23, 2003 Author Posted September 23, 2003 Hi LaRetta, I want to thank you for your help, the value list with the calculation did the trick, it saved me alot of time as you could see. Steve
Recommended Posts
This topic is 7736 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 accountSign in
Already have an account? Sign in here.
Sign In Now