Jump to content
Server Maintenance This Week. ×

Handling Blank Fields in Merge Field Bulleted List


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

Recommended Posts

  • Newbies

I have 5 different "fact" fields that I am outputting in a merge field.

The challenge I have is when one of the fact fields is blank, I get a orphaned bullet point with no content.

Is there a way to build conditionality into the merge field so that bullets are omitted if the following field is blank?

Link to comment
Share on other sites

Make a calc field with the formula:

Case ( Trim ( FieldA ) = "" ; "" ; "• " & FieldA ) 

& "¶" & 

Case ( Trim ( FieldB ) = "" ; "" ; "• " & FieldB ) 

& "¶" & 

Case ( Trim ( FieldC ) = "" ; "" ; "• " & FieldC )

& "¶" & 

Case ( Trim ( FieldD ) = "" ; "" ; "• " & FieldD )

& "¶" & 

Case ( Trim ( FieldE ) = "" ; "" ; "• " & FieldE )

The result will be a list without 'empty bullets', but with 'empty returns'. You can strip these out with the custom function RemoveEmptyValues

If you don't want to use a custom function you might try to use the Substitute function to get rid of the superfluous returns.

Success,

Henk

Link to comment
Share on other sites

Or you can use:

"• " & Substitute ( List ( fieldA ; fieldB ; fieldC ; fieldD ; fieldE ) ; ¶ ; "¶• " )

... which eliminates the blank lines if any of the fields are blank. It's just another approach. You might also consider placing it inside a web viewer which would eliminate the calculation field alltogether.

Oh Henk! You modified your post! Ah well, I've leave mine anyway. :wink2:

Oh! And Evan? Welcome to FM Forums!! :laugh2:

Edited by Guest
Added second Oh!
Link to comment
Share on other sites

This topic is 5472 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
×
×
  • Create New...

Important Information

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