melal Posted October 8, 2011 Posted October 8, 2011 Hi. I'm using File Maker 11 pro. I have a database with 2000 entries of names and I have their birth dates in my table. I want to have the people's names and their birth dates shown automatically on the current date when I start to use the File maker pro 11. How can I do that? e.g. Mary Jason -- 20 September 2011, Micheal Mark -- 19 September 2011. Today's 20 September 2011. When I start the program, I want to see Mary Jason's name and her birthdate automatically. Also the list needs to have the topic "Born on today". Thanks in advance for the reply.
bcooney Posted October 8, 2011 Posted October 8, 2011 What are you going to do about people whose bday's fall on a non-work day. Are they skipped? You can Find in a date field using wildcards. 10/*/** (Finds all October birthdates). See Help for more Find techniques.
melal Posted October 9, 2011 Author Posted October 9, 2011 Thanks for your reply. Non-work day will be skipped. It is not important. ı tried 10/*/** (Finds all October birthdates) it works but I want to have the people's names and their birth dates shown automatically when I start to use the File maker pro 11. ı think ı need a script that will run automatically but I don't know how to write a script. Thanks.
comment Posted October 9, 2011 Posted October 9, 2011 Yes, you need a script - something like: Go to Layout [ Contacts ] Enter Find Mode [] Set Field [ Contacts::DOB ; Substitute ( Get (CurrentDate) ; Year ( Get (CurrentDate) ) ; "*" ) ] Perform Find [] You should also consider what should happen if no records are found. Re running a script automatically upon opening a file, see: http://www.filemaker....4.html#1048844
melal Posted October 9, 2011 Author Posted October 9, 2011 Thank you for your help. It worked, but when there is no match for any record, I want to have a dialog like "No record has been found" in the message box. Like in Show Custom Dialog, I want to see this script just once when I start File Maker. When I click OK or exit, it won't appear again until next start of File Maker. How can I do that? P.S. I also want to see the people's names and their birth dates in the message box like Show Custom Dialog.
comment Posted October 9, 2011 Posted October 9, 2011 when there is no match for any record, I want to have a dialog like "No record has been found" in the message box. Try: Go to Layout [ Contacts ] Enter Find Mode [] Set Field [ Contacts::DOB ; Substitute ( Get (CurrentDate) ; Year ( Get (CurrentDate) ) ; "*" ) ] Set Error Capture [On] Perform Find [] If [ not Get (FoundCount) ] Show Custom Dialog [ "No birthdays today" ] Else Pause/Resume Script [indefenitely] End If Go to Layout [ Some other layout ] I also want to see the people's names and their birth dates in the message box like Show Custom Dialog. I don't think that's a good idea. Use a list view layout of your Contacts table.
melal Posted October 9, 2011 Author Posted October 9, 2011 Thank you very much for your script idea. It worked properly. When I see the list / table view, I can see the people with birth dates. There is no problem with that. Is it possible that to see the names of these people in another method like showing them in Show Custom Dialog by calculation? I also wonder isn't it possible to have this script work by starting File Maker? Now I have to start the script by choosing it from the script list. I want to have this automatically worked when I start to use File Maker. Thanks again.
comment Posted October 9, 2011 Posted October 9, 2011 I also wonder isn't it possible to have this script work by starting File Maker? Now I have to start the script by choosing it from the script list. I want to have this automatically worked when I start to use File Maker. I answered this in my first post. Is it possible that to see the names of these people in another method like showing them in Show Custom Dialog by calculation? It is "possible" - but a custom dialog is not suitable for showing lists or tabular data.
melal Posted October 9, 2011 Author Posted October 9, 2011 Thank you for the help. I did what you wrote in the first post and solved the problem by choosing the script to open by entering in file options. You said "It is "possible" - but a custom dialog is not suitable for showing lists or tabular data." What is suitable then for showing lists or tabular data for my case? How will I manage to show the names and the birth dates on a message box?
comment Posted October 9, 2011 Posted October 9, 2011 What is suitable then for showing lists or tabular data for my case? A layout in List view (or in Table view, if you prefer).
melal Posted October 9, 2011 Author Posted October 9, 2011 ok. As I understood from your reply that I don't have a choice other than table view or list view. Am I right?
comment Posted October 9, 2011 Posted October 9, 2011 No, that's not what I said. You do have a choice. But since the other choice doesn't look good (see attached example) AND takes more work to setup, I choose not to expand on it.
melal Posted October 10, 2011 Author Posted October 10, 2011 The attached example is what I wanted to do. Can you please explain how to do it if it is not so complex. Thank you very much in advance.
Recommended Posts
This topic is 5066 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