Naval Posted January 23, 2017 Share Posted January 23, 2017 Hi there can anyone please help me rewrite this javascript rule below if (Field("Mob") == "") return ""; else return '<f name="AC Bliss Medium"><z newsize="7"><color cmyk=000000FF>Mob </color></f>'+ '<f name="AC Bliss Light", <z newsize="7"><color cmyk=000000FF>' + Field("Mob")+ '<br>';'</color></f>'; Someone has written this rule but i want to know if there is a way to simplify this. What this essentially is returning is Mobile phone field with a prefix Mob in AC Bliss Medium font and then the mobile number that the user enters in AC Bliss Light font. Thanks for your help in advance. Naval Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 23, 2017 Share Posted January 23, 2017 The best way to simplify your rule is to not have a rule at all. Just enter the prefix and the variable, with all the relevant formatting, in the Variable Text Editor dialog for the text frame, then click the Paragraph button, check the "Suppress if" box, and select "Containing Empty Variables" from the drop-down. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.