Go Back   PTI Marketing Technologies User Community > Software-Related Talk > The JavaScript Library > Formatting Text

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 4th, 2010, 05:38 PM
David Miller David Miller is offline
Senior Contributor
 
Join Date: Oct 2008
Location: Wallingford, CT
Posts: 260
Default Vary Tab Stops in a Rule

Is it possible to set a tab stop based on whether variable x contains anything or not and variable y contains anything or not?

The logic:

setTab1 = if field direct is empty tabstops are 0;1224,Left,,;
setTab2 = if field direct is not empty tabstops are 0;2448,Left,,;

and

if field phone is empty return nothing
else return my phone label + a tab character at the proper setting based on field direct (above)

Sorry, I'm having problems inserting any actual code. Thanks!
Reply With Quote
  #2  
Old January 5th, 2010, 06:22 AM
esmith's Avatar
esmith esmith is offline
Senior Contributor
 
Join Date: Oct 2008
Location: Charlotte, NC
Posts: 870
Default Re: Vary Tab Stops in a Rule

Code:
var setTab = (Field("Direct") == "") ? "0;1224,Left,,," : "0;2448,Left,,,";
return (Field("Phone") == "") ? "" : MyPhoneLabel + "<p tabstops=\"" + setTab + "\">" + ...;
__________________
Eric Smith
Content Developer
Classic
FP 9.3.6, MAC OSX 10.9.4, Acrobat 11.0.09
Reply With Quote
Reply

Tags
rules, tabs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:05 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.