Jump to content

Bullet points to show up when previewing


BuffaloPrintingCo

Recommended Posts

I have the java code below:

 

return Field("Address 1")+' '+'•'+' '+Field("City State Zip 1")+' '+'•'+' '+Field("Phone 1");

 

Fields Address 1, City State Zip 1, and Phone 1 all exist and it's supposed to put a space then a bullet then another space between the three fields. When it previews, it actually put the text  •  in there instead of the actual characters.

 

What am I missing?

Link to comment
Share on other sites

Great! thanks,

that got the actual characters to show up but now my issue is this.

I have 4 lines of this code with Address 1, Address 2, etc etc and not all the fields always get filled in.

How can I make it so that the symbols disappear when there is no variable field filled in?

Link to comment
Share on other sites

Here's an example of one way it could be done:

 

var addr1 = Field("Address 1");
var addr2 = Field("Address 2");
var spacer = " • ";

if (addr1.length > 0)
addr1 += spacer;

if (addr2.length > 0)
addr2 += spacer;

return addr1 + addr2 + Field("City State Zip 1") + spacer + Field("Phone 1");

 

It checks the string length of the value for those fields. If there is more than 0 characters, it appends the spacer string.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...