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


Thread Tools Search this Thread Display Modes
Old November 1st, 2019, 10:54 AM
oleooo oleooo is offline
Junior Community Member
Join Date: Nov 2010
Location: Boise, Idaho
Posts: 30
Default shift Tab between Phone and email

Trying to split the phone number and email in a rule. I have created a if else statement so that if the email is missing the phone will center and if the phone is missing the email centers. I just can not get the last part to work. where generally in most programs if you hit tab shift it will equally split them.
Is there a way to code this with a tag.

here is the code I put together.
if (Field("Phone") < 1) {
return '<center>'+Field("Email")+'</center>';
} else if (Field("Email") < 1 ) {
return'<center>'+ Rule("phone format Rule1")+'</center>';
} else {
return '<p br=false quad=L>'+Field("Phone")+'<p br=false quad=R>'+Field("Email");

this is an example

208-371-9041 Ole@DirectOrthocare.com

Last edited by oleooo; November 1st, 2019 at 10:59 AM..
Reply With Quote
Old November 1st, 2019, 03:25 PM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
Join Date: Feb 2011
Posts: 236
Default Re: shift Tab between Phone and email

Change the 14400 to whatever your frame width is (or just slightly under). Value is inches times 7200.

if (Field("Phone") && Field("Email"))
    return '<p br=false quad=L tabstops="0;14400,Right">' + Field("Phone") + '<t>' + Field("Email");
    return '<p br=false quad=C>' + Field("Phone") + Field("Email");
Explanation of whats happening here.

First you are evaluating if there is a value in both fields, if so then you are replacing the default tabstops with only a right aligned stop at the edge. Then placing the value of both fields separated by a tab.

If both fields do not have values, then you are replacing alignment with center and returning the value of both fields, only one of which will have something in it.

Last edited by ThomasLewis; November 1st, 2019 at 03:31 PM..
Reply With Quote

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 03:43 PM.

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