April 3, 201213 yr Newbies hello, hope somebody could help... i have a db with insurance clients whom i would like to congratulate on their birthdays; my task is to write a script which would give me a list of birthdays in a given period of time, e.g. this week, next month, etc... script which i "wrote": Enter Find Mode Set Field (Clients :: month; Month(Get(CurrentDate))) Perform Find allows me to list persons in a current month only; apart from that, the list shows mixed dates, is not chronological with respect to days any attempts to modify the script with "day" were futile; so obviously i still got to learn a lot... thanks in advance, fmfox
April 3, 201213 yr You really don't need a script. Just do a Find. 3/*/* finds all dob = March then sort, dob ascending, if you want. Not sure why you need it sorted...for a printout?
April 3, 201213 yr Set Field (Clients :: month; Month(Get(CurrentDate))) You have a field for the client's month of birth?? the list shows mixed dates, is not chronological with respect to days If you want to sort them by their order of appearance in the calendar, try defining a calculation field (result is Number) = Month ( DateOfBirth ) + Day ( DateOfBirth ) / 100 and sort by this field. This assumes you are not finding for a period that spans across a year boundary.
April 3, 201213 yr Automatic message This topic has been moved from "FileMaker Product Family → FileMaker Pro 11" to "Database Schema & Business Logic → Calculation Engine (Define Fields)". The General topic areas are intended for the discussion of the functions, features and tools that were new with the particular version mentioned. All how-to question should be posted to a topic area that best matches the sprit of the problem. Many questions can fit into more then one area, but you only need to pick one, and go with it. If you have any questions about this action, please contact me through a private message. Lee
April 3, 201213 yr Author Newbies You really don't need a script. Just do a Find. 3/*/* finds all dob = March then sort, dob ascending, if you want. Not sure why you need it sorted...for a printout? yes for printout... thanks for the tip, will give it a try... You have a field for the client's month of birth?? no...a field defined as date in format of dd/mm/yyyy If you want to sort them by their order of appearance in the calendar, try defining a calculation field (result is Number) = Month ( DateOfBirth ) + Day ( DateOfBirth ) / 100 and sort by this field. This assumes you are not finding for a period that spans across a year boundary. that's a precious tip...thanks; will test yours and the one of bcooney...
April 4, 201213 yr Author Newbies yes for printout... thanks for the tip, will give it a try... that's a precious tip...thanks; will test yours and the one of bcooney... well, your "find" does find all birthdays of a given month, but ascending sorting sorts by year, but i need by day of the month... any further thoghts? thanks...
April 13, 201213 yr Author Newbies I'm confused by your setup. Do you have a DateOfBirth field that is a date field? yes i do; and although your Find (3/*/* finds all dob = March) gave me correct result, the Sort was still achronological; so, as comment suggested i solved the problem with an extra calculation field DOB (Month ( DateOfBirth ) + Day ( DateOfBirth ) / 100) and Sort became chronological...thanks...
Create an account or sign in to comment