Newbies mmluon Posted August 29, 2008 Newbies Posted August 29, 2008 I'm new to filemaker and need some help getting unstuck. I'm building a database for the school i work at and want to display the courses for a particular month (i.e.-for the month of October) in a portal. How can i do this? I've tried a few different ways but now I'm just lost. Thank you for your assistance
Stomp Posted August 29, 2008 Posted August 29, 2008 Search the forum for "filter portal" and you'll turn up a lot of stuff. Basically, you want to add a couple of global fields in the parent table to hold a begin and end date, then setup the portal relationship like this: Parent key = Child key Global start date < Child date Global end date > Child Date Then populate the globals using whatever method you wish. There are other ways to do it, but this is pretty flexible.
Newbies mmluon Posted August 30, 2008 Author Newbies Posted August 30, 2008 Thank you very much. I'll try it out. I appreciate the friendly assistance. Since I'll be the database administrator/developer for the school- my Filemaker knowledge will improve. Practice makes perfect and you have to crawl before you can walk. :-)
Newbies mmluon Posted August 31, 2008 Author Newbies Posted August 31, 2008 i'm still having a problem getting it to work. I have tables for courses,clients,attendance,and invoices. The clients are billed at the beginning of the month for the previous month's classes. The user clicks a button that goes to the invoice layout which collects the relevant data I want to use a portal on the invoice layout to display only the courses being billed for the previous month. so far i've figured this much out: Invoice = parent / Attendance = Child Tables related through Client ID Gloabal fields - StartDate & EndDate - on Parent (thanks, stomp) i'm having difficulty writing a formula needed to populate the global fields used to filter the portal. This is my first Filemaker database and it's been going well up to this point but i think i may need a little hand-holding now to get me back on track. If i can overcome this hurdle- then i can have the solution finished in time for the coming school year. Please help with detailed instructions. Also - Can anyone suggest good Filemaker reference or training books? Thanks
Fenton Posted August 31, 2008 Posted August 31, 2008 If you always want "last month", then the following works (result is Date): 1st day of last month: Date(Month(Get(CurrentDate)) - 1; 1; Year(Get(CurrentDate))) Last day of last month (old FileMaker trick, hopefully future also): Date(Month(Get(CurrentDate)); 0; Year(Get(CurrentDate))) or use (not tricky) Date(Month(Get(CurrentDate)); 1; Year(Get(CurrentDate))) - 1 FileMaker is smart enough to adjust the year in Jan, so you get Dec of the previous year. To be more flexible, you can use a global date field instead of Get (CurrentDate). Set it with your script. Adjust if desired. You'd do the same for the Date field in the data, create a similar calculation field to use as the target of the relationship.
Recommended Posts
This topic is 5985 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