Jump to content

How can I filter out empty fields??


This topic is 6459 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi,

I created a layout that has around 15 fields in it, and a script to go along with it that automatically creates an e-mail message in Outlook and pastes these fields into the body text -- one per line -- so that it can be sent to a vendor (it's essentially just a parts list).

Everything works very well, but my only problem is that I don't always fill out all 15 fields, and thus when FileMaker pastes them into the e-mail, there are gaps between the fields. Again, it pastes one field per line...so if I don't fill out fields 8 through 14 for example, then there's a gap of six blank lines between field 7 and 15.

Is there any way I can tell FileMaker to only paste the fields that are filled out (i.e., have a value in them) and ignore the empty ones??

Thanks for your help-

RRT

Link to comment
Share on other sites

Robbie:

Welcome to the Forums. There are a couple of ways to do this. You can use a Case statement for each field, or you can check for a field's emptiness with "not IsEmpty". The latter is easier to comprehend:

For each item, encapsulate the copy & paste within an If statement:

If [not IsEmpty(FieldA)]

cut

paste

End If

-Stanley

Link to comment
Share on other sites

  • Newbies

Here's how I currently have things set up. The body text of my e-mail is actually a "defined field," and it's simply placed there by the script...so I could either try to fix things in the define field area, or possibly replace all of this with a script?

"ATMID: "&ATMID&"

Link to comment
Share on other sites

This topic is 6459 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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