rpaterick Posted July 7, 2009 Share Posted July 7, 2009 Trying to get Cell Phone before the field Cell Phone. When it has value, it should look like Cell Phone XXX-XXX-XXXX When no value, just blank. Code I have now which is wrong. if (Field("Cell Phone") == "") { return ""; } else return Field("Cell Phone") + "Cell Phone " ; Thanks, Ryan Link to comment Share on other sites More sharing options...
ehazzard Posted July 7, 2009 Share Posted July 7, 2009 Ryan, If there is only one variable on the line you actually do not need a rule to manage this. Instead, open the frame in the variable text editor window, highlight the line 'Cell: xxx-xxx-xxxx', click the Paragraph button and select suppress 'if containing empty variable' option. This should do the trick! Link to comment Share on other sites More sharing options...
rpaterick Posted July 7, 2009 Author Share Posted July 7, 2009 Ryan, If there is only one variable on the line you actually do not need a rule to manage this. Instead, open the frame in the variable text editor window, highlight the line 'Cell: xxx-xxx-xxxx', click the Paragraph button and select suppress 'if containing empty variable' option. This should do the trick! I think this will do! Thanks! I was thinking it had to be CODE. Link to comment Share on other sites More sharing options...
ksohayda Posted February 17, 2011 Share Posted February 17, 2011 I have a line that looks like this: «Change phone format Rule_Contact» • «Website» I need to suppress the bullet if the website is empty. I tried what this thread suggests, but it's not working? It keeps suppressing the whole entire line? I try and select the bullet and website only, but it checks the entire line including the "Change Phone Format"???? Any ideas what I can do to suppress just the bullet and website? I have Fusion Pro 7.0p1d, Vista format (yuck) & Abode Pro 9.0 Link to comment Share on other sites More sharing options...
Dan Korn Posted February 17, 2011 Share Posted February 17, 2011 I have a line that looks like this: «Change phone format Rule_Contact» • «Website» I need to suppress the bullet if the website is empty. I tried what this thread suggests, but it's not working? It keeps suppressing the whole entire line? I try and select the bullet and website only, but it checks the entire line including the "Change Phone Format"???? Any ideas what I can do to suppress just the bullet and website? If the line has something other than a single label and field, you can't use the "Suppress if containing empty variables" setting. You have to write a rule. It's very simple logic though: if (Field("Website")) return "• " + NormalizeEntities(Field("Website")); //else return "";Make sure to check "Treat returned strings as tagged text." Link to comment Share on other sites More sharing options...
ksohayda Posted February 18, 2011 Share Posted February 18, 2011 Awesome. Thanks. I'll try this out Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.