Jump to content

Spacing between variables not suppressing


Judblant

Recommended Posts

Hi,

I've got a one line text frame for the footer of our letter head. My problem is that each of the variables are to be five spaces apart; however the five spaces are not suppressing if a variable is blank. The variable is suppressing just fine, but not the spaces. What's more aggravating is that if I only put one space between the variables it works! Has anyone else come across this problem? How did you solve it?

Link to comment
Share on other sites

Judblant,

 

Are you using a JavaScript rule to accomplish this or are you using the suppress if feature in the paragraph settings in the text frame editor? Please provide the code you are using if applicable, the version of FusionPro you are using, PC or Mac and the Operating System to help troubleshoot this issue. Thanks.

Link to comment
Share on other sites

I'm using the suppress feature in the paragraph settings. Javascript and I aren't the best of friends; but it looks as though I'll have to break down and create some rules. I'm on a PC, Windows XP, Fusion Pro 6.2P1a
Link to comment
Share on other sites

A JavaScript Rule is the best way to accomplish this formatting rather than the suppress feature in the paragraph settings. Below is a simple illustration to return a Phone and Fax number if they both exist but how to suppress the fax info if one is not provided. I'm not sure of your example but this should help you get started.

 

Phone: 800.555.1234 - Fax: 800.555.3773 (with both variables present)

Phone: 800.555.1234 (if Fax number is not provided)

 

if (Field("Fax") == "")

return "";

else

return ' - Fax: '+Field("Fax");

 

If the Fax number does not exist it returns no value, however, if the fax number does exist it returns not only the variable but also the formatting: ^-^Fax:

 

In your case that would be the 5 spaces. This is just a jumping off point but you may want to re-post this or visit the JavaScript section in the forum to see if there is already a rule there to help you out. Hope this helps!

Link to comment
Share on other sites

I've come to the conclusion that extra spaces are not easy. I've set up the rule; however the five extra spaces do not appear. The rule works perfectly if I put in dashes (Example: -----) However if I try spaces; only one space will appear. Even if I put

return ' '+ ' '+ ' '+ ' '+ ' '+ Field("Address2");

Or

return '<nbsp;>'+ '<nbsp;>'+ '<nbsp;>'+ '<nbsp;>'+ '<nbsp;>'+ Field("Address2");

I've tried it a thousand other ways...nothing has worked so far. How do I get the extra spces to appear!?!?!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...