Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Form Letter and Duplicate records

Featured Replies

I have a db that I use to track art and the supplier of the art.

I preform a search for all the art that I used last month and wish to send a letter to each of the suppliers of that art.

I have made the form letter, but here is the problem. Since I may have used 5 pieces of art from one supplier, there are 5 occurances of that supplier in my form letter layout.

I hope that makes sense. How can i weed out the duplicates so it will only print one page for each supplier.

sorry if that was confusing

For printing your letters, you could put the whole thing on a Sub-summary part, then sort by supplier. That way you can print one of each, no need to find the duplicates.

But if you want to find dupes: in Find mode, an exclamation point ("!", without the quotes) in any field will find the duplicates, but then you have to run a looping script to Omit them.

However... for future reference, you will be able to manage things much better by breaking the suppliers and art into separate related files. Duplicating your contacts like that as you have just found out is bound to cause problems.

quote:

Originally posted by Steve S:

I have a db that I use to track art and the supplier of the art.

I preform a search for all the art that I used last month and wish to send a letter to each of the suppliers of that art.

I have made the form letter, but here is the problem. Since I may have used 5 pieces of art from one supplier, there are 5 occurances of that supplier in my form letter layout.

I hope that makes sense. How can i weed out the duplicates so it will only print one page for each supplier.

sorry if that was confusing

Hi there,

here's how you can acheive this:

create two global fields mySupliersList and globalRecID

define relationship "Supliers" from mySupliersList to Supliers

and firstRecord as calc Supliers:: RecID from relationship Supliers.

define relationship "onlyFirstOne" from globalRecID to RecordID

( if you don't have it than create it now)

Create an layout with only one field on it:

Supliers::firstRecord

Create an script named findFirstOnes

code:


Freeze Window

Set error capture [on]

Set Field [globalRecID,""]

Find All

Go Layout [your one field layout]

Copy All records

Go To Layout [ layout with filed globalRecID on It]

Paste[globalRecID,select]

Go to Related record ["onlyFirstOne",show only related records]

HTH

Dj

  • Author

Thanks you two..

especially Fitch, that suggestion about putting it in a sub summary art was just the easy solution I was looking for. DJ's response made me dizzy, so I stuck to yours smile.gif

And by the way, I do have this set up as a relational database, one db for suppliers and one for art.

I dont have duplicate records for my suppliers, I have many art records linked to one supplier record... So when I do a search on the art, I get multiple hits on the same supplier record.

But thanks alot, after fussing with it for some time I got it working the way I want.

Now I find I have a smiliar problem with my labels.. I want to do the same thing, but with labels instead of a form letter.. I've been fussing with sub summary parts, but cannot quite get it right.

Maybe I have to get dizzy...

smile.gif

[ April 12, 2002, 06:48 AM: Message edited by: Steve S ]

Re: your labels, first just use one of the pre-set label layouts, then double-click on the body part and change it to a sub-summary.

However, now that we have the whole story, I think you should try something along the lines of dj's solution. It's really not too tricky.

1. In your art file, create a global text field, let's call it gArt. Put this field on a layout somewhere, or make a layout to put it on.

2. Create a relationship to your suppliers file, gArt::supplier id. We'll name this relationship... suppliers.

3. Make a layout (we're still in the art file) that has ONLY the supplier id field on it.

4. Now make a script:

. Go to layout (supplier id).

. Copy all records.

. Go to layout (with gArt on it).

. Paste into gArt.

. Go to related records (suppliers, show only related).

Basically the same script dj already posted. Possibly the confusing part was the self-relation, I don't know. But that isn't the case here -- you already have two related files.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.