Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Creator

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 15th, 2015, 08:03 AM
bdgreene88 bdgreene88 is offline
Forum n00b
 
Join Date: Dec 2015
Posts: 2
Default Tabbed Lists

Thanks in advance for your help!

I need to create a tabbed list within the body of a letter. All the lists are all variable. It would look like the following:

<improve_1>TAB<improve_2>
<improve_3>TAB<improve_4>
<improve_5>TAB<improve_6>
<improve_7>TAB<improve_8>
<improve_9>TAB<improve_10>
<improve_11>TAB<improve_12>
<improve_13>TAB<improve_14>
<improve_15>TAB<improve_16>
<improve_18>TAB<improve_18>

Not all of the variables are used. Some just have just 1, others have all 18. The body of the letter will need to flow with the tabbed list.

My problem is when I use "suppress if containing empty variables", it removes the entire line if just one of the variables are empty.

Any advice you can give would be GREATLY appreciated.

Thank you!
Reply With Quote
  #2  
Old December 15th, 2015, 08:24 AM
jwhittaker jwhittaker is offline
Senior Contributor
 
Join Date: Feb 2009
Location: San Diego
Posts: 165
Default Re: Tabbed Lists

bdgreene
I'm just a hack when it comes to javascript but you can make rules for each line. You don't have to select anything and suppress it.

//Rule for improve_1 and improve_2 line
if ((Field("improve_1") != "") && (Field("improve_2") != ""))
return Field("improve_1") + '<t>' + Field("improve_2");

else if ((Field("improve_1") != "") || (Field("improve_2") != ""))
return Field("improve_1") + Field("improve_2");

else
return "";
__________________
FusionPro VDP Creator 10.0.26 | MacOS 10.13.4 | Acrobat DC
Reply With Quote
  #3  
Old December 15th, 2015, 09:53 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Tabbed Lists

You can make a rule to return them all with the appropriate formatting:
Code:
fields = [];
i = 0;
while (i < 18) {
    r=[];
    while (r.length<2 && i<18)
        if (a = Field('improve_' + ++i)) r.push(a);
    fields.push(r.join('<t>\t'));
}
return fields.join('<br>\n')
Make sure that that "Treat returned strings as tagged text" is checked.
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #4  
Old December 15th, 2015, 09:57 AM
bdgreene88 bdgreene88 is offline
Forum n00b
 
Join Date: Dec 2015
Posts: 2
Default Re: Tabbed Lists

THANK YOU! That worked perfectly!
Reply With Quote
Reply

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 02:29 AM.


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