July 26, 200421 yr I was wondering if anyone has written a calculation for shortening organization names & addresses. I want users to enter the full names and addresses of organizations and keep the data accurate (otherwise various problems were cropping up), but when it comes time to print labels, that can mean the info doesn't all fit. So I need a calculation that checks the length of each line, and, if it is too long, uses common address abbreviations to shorten it. And if that doesn't work, I guess just trim off the end and hope it still makes sense? And if there are too many address lines, it would also have to combine and then shortens them. I'm sure smarter minds than mine have already mulled on this issue...Any help is greatly appreciated!
July 26, 200421 yr I am not too sure about doing this in FIlemaker 4. I am using 7 and there is an easy way to shorten any text string to a number of characters. It is a text function called "Left" It basically counts the number of characters from the left edge and will cut off anything after the number you specify. You may want to check if it exists in 4. If you can figure out great, if not give me a shout back here and I will try to walk you through it. Thanks!
July 26, 200421 yr Author I definitely can use the text function Left in Filemaker 4 and do know how to do it. It's just that I was hoping someone might have figured out the whole complicated calculation including replacing common words and combining address lines so that whenever possible the calculation would shrink the address intelligently instead of just cutting the lines off no matter what. Guess a girl can dream at least...
July 26, 200421 yr Try a smaller font or a bigger label. You're using merge fields or sliding, right?
July 26, 200421 yr Author I am using merge fields and a pretty small font (Helvetica, 9pt.). They usually use 5660 avery for the labels, and the bigger labels cost more so that's not such a great long term solution for us (tiny non-profit, hence the outdated filemaker 4.1). Though that is what they're doing right now in the interim. The reason it's an issue at all is that the person who does the big bulk mailings goes insane when the addresses don't fit the labels and changes all the data to make it fit. Then other people can't find the organization, for example, because its now called Astrea Natl Fnd instead of Astrea National Foundation, and so they make a duplicate...So I promised her I'd ensure the addresses always fit if she promised to leave the data alone...
July 26, 200421 yr So I need a calculation that checks the length of each line, and, if it is too long, uses common address abbreviations to shorten it. First, you'd need to list any "word" for which you've got an abbreviation. Then, you could use a calculation along these lines Case(Length(MyAdressField>yourCharacterNumber, Substitute(Substitute(Substitute(MyAdress,"Avenue","Av."),"Drive";"Dr."),"Street","St"), MyAdressField) HTH
July 26, 200421 yr Hey Pittelman! I know you are using FMP 4, and i don't have a copy of that any longer so I am not sure this will work for you, but there is (in FMP 7 at least) a Substitue function that allows you to replace any text string with another text string within a field. This sounds like it would fix your problem, except it would not differentiate between the street in 123 Sesame Street and the street in Streetville, KY (if anything like that would ever come up).
July 26, 200421 yr Author Thanks Ugo, that helps. Guess I was dreaming someone may had gone through the whole thing already, including the list of all the words, and that I'd just be able to copy them!
July 26, 200421 yr Author Thanks so much for the postal abbreviations, Ugo! That will make the task much easier!
July 27, 200421 yr You might thnk bout using a fixed pitch font such as Courier. Makes it easier to do calcs on the length. In one of my apps where label printing is a small part, I display an approximation of what the label will look like - pretty hard to allow for sliding in Browse mode! The user can add an override of the full name and address. This leaves the name and address intact but also lets the label be fixed.
Create an account or sign in to comment