Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4640 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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 frown.png

any attempts to modify the script with "day" were futile; so obviously i still got to learn a lot...

thanks in advance,

fmfox

Posted

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?

Posted

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.

Posted

Automatic message

This topic has been moved from "FileMaker Product FamilyFileMaker Pro 11" to "Database Schema & Business LogicCalculation 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

  • Newbies
Posted

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...

  • Newbies
Posted

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...

Posted

I'm confused by your setup. Do you have a DateOfBirth field that is a date field?

  • 2 weeks later...
  • Newbies
Posted

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...

This topic is 4640 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.