Newbies VAhorsevet Posted January 4, 2008 Newbies Posted January 4, 2008 I have a DB with invoice file related to client file. When making monthly statements, each client will have multiple invoices per monthly statement. I want to print mailing labels from the found set of statements, but need to eliminate all but one duplicate client name & address fields (FROM EACH INVOICE). Each client has a unique client ID. WHEN WRITING A SCRIPT TO DO THIS THE Omit function in find function eliminates ALL. I need to retain one to print a mailing label.
Kiwi Posted January 4, 2008 Posted January 4, 2008 Have a read of http://www.filemaker.com/help/Non-TOC%20Topics3.html It should do the trick. cheers :
Hipsig Posted February 2, 2009 Posted February 2, 2009 Hi Kiwi, I just clicked on the link you provided and it no longer seems to be connected. Do you know where else I can find this info? Thanks in advance. Hipsig
Dean Suhr Posted May 5, 2011 Posted May 5, 2011 Try this as an outline of an approach. In your case I do not think you wish to delete records - at the end of the script add a show omitted only command (and don't do the manual delete they discuss). Finding Duplicate Records in FileMaker Pro
Wickerman Posted May 9, 2011 Posted May 9, 2011 Dean -- thanks for posting that link. I'm still shaky with scripting, and especially looping skills and have a question about the loop in that solution: Show All Records Sort Records [Restore, No Dialog] Sort by Client ID in Ascending order Go to Record/Request/Page [First] Replace Field Contents [No dialog, 'Mark', " "] Loop Set Field['Global','ClientID'] Go to Record/Request/Page [Next, Exit after last] If ['Global = ClientID'] Set Field ['Mark', '"X"'] Else Set Field ['Global','ClientID'] End If End Loop Perform Find [Restore] Find records when Mark = X Isn't the step I've placed in bold needlessly duplicated in this loop? it seems to me that the Global Field is set to the ClientID at the end of the loop sequence, and then again at the beginning of the loop sequence. I don't suppose it makes a difference, but I'm wondering whether the Loop wouldn't work fine if you just removed that second Set Field line -- or, what's more natural to my eyes, put the fit=rst one *before* the Loop begins, and leave the second one where it is? It's maybe a petty question, but sometimes asking a question like this really helps me discover I'm not "getting" in Filemaker.
Fitch Posted May 9, 2011 Posted May 9, 2011 You do need both "Set Global" steps but the first one should go above the Loop. I'd script it a little differently, but rather than go there, I'm going to question your premise. Why not use a layout with a sub-summary part (by statement) that has the address fields on it?
Wickerman Posted May 9, 2011 Posted May 9, 2011 I'd script it a little differently, but rather than go there, I'm going to question your premise. Why not use a layout with a sub-summary part (by statement) that has the address fields on it? THanks for the reply, Fitch -- I wasn't the original poster, just happened on the thread and like to read things that address topics I'm working toward competence on. Based on your reply I think I'm understanding that scrip[t ok.
Fitch Posted May 9, 2011 Posted May 9, 2011 Once again I'm roped into answering a 3-year old thread. Glad it helped you, at least.
Recommended Posts
This topic is 4945 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