JimDionisio Posted April 26, 2002 Posted April 26, 2002 I'm a new user of FileMaker Pro 5.5 and have a question on filtering inside of Portals. I've read a few postings on it but for some reason I'm not getting it. Here is the details: I have an Orders data file with years of data in it and I'm needing to invoice out of that file. I've created an invoice data file and I'm using a customer no. in both files as my relationship to tie them together sorting them by date descending. The portal shows all files from orders O.K. and I would like to be able to do the following: Pull up only files in a date range i.e. startdate and enddate Be able to tag those records once they've been invoiced (or manually tag them inside the portal.) Have a total or sub total calculation in invoice data based on the portal records from my filter. Any help is very much appreciated as I'm STUCK!
LiveOak Posted April 26, 2002 Posted April 26, 2002 This is done with a global text field on the left side of the relationship used for the portal. Relate the global field to invoice date. To see all invoices from June 1, 2001 to June 6, 2001, the global field is set with a looping script to: 6/1/2001 6/2/2001 6/3/2001 6/4/2001 6/5/2001 6/6/2001 That's right, you'll need one entry and a carriage return for each date in your date range. Marking records is done with another global text field, let's call it gMarked. Clicking on a record triggers a button and a script which adds the record number of the record (is it isn't alread in gMarked) or deletes it if it is alread in gMarked. i.e. If (PatternCount(gMarked, DateRelationship::RecordNum)) SetField(Substitute(gMarked, DateRelationship::RecordNum & "
JimDionisio Posted April 26, 2002 Author Posted April 26, 2002 Hello Bd, First let me say thank you for your quick response! I'd like to ask you a few questions? First, What do you mean by "on the left side of the relationship?" Would that be the order file or the invoice file? You describe a global field set with a looping script. Does that mean I would have to type every possible date that may be in the order file? Where does the startdate and enddate go in this equation? Thanks again for your help.
LiveOak Posted April 27, 2002 Posted April 27, 2002 Left side of the relationship is sort of slang. In the dialog box in which you define a relationship, the key field in the current file is selected on the left of the dialog box, the related file and it's fields are selected on the right side of the dialog box. Yes, you have to put all the dates in the global field (see the example I gave you). This is done using a script which starts with the value in the "begin date" fields and loops and makes enteries until the value in the "end date" field is reached. As an alternative, there is a FM plug-in that does this for you. -bd
Recommended Posts
This topic is 8248 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