Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old July 31st, 2017, 08:08 AM
gdellaiera gdellaiera is offline
Regular Contributor
 
Join Date: Nov 2016
Posts: 78
Default On Record Start

So I was able to come up with a good rule for On Record Start for a Name/Title field, but then had to add in a condition for the address as well. It worked perfectly fine until I added the address portion & now it will only use the 'long page', even when the 'short page' is supposed to be used.

Is there something missing below? I've been racking my brain to figure out what is going on, but every time I validate, FusionPro returns 'Expressions Ok'.

Thanks for the look.

var name = Field("Name");

var title = Field("Title");

var nametitle = name + "," + title;

if (nametitle.length <= 26){
FusionPro.Composition.SetBodyPageUsage("Short Name", true);
FusionPro.Composition.SetBodyPageUsage("Long Name", false);
}
else{
FusionPro.Composition.SetBodyPageUsage("Short Name", false);
FusionPro.Composition.SetBodyPageUsage("Long Name", true);
};

var address = Rule("Format Address");

if (address.length <= 40){
FusionPro.Composition.SetBodyPageUsage("Short Name", true);
FusionPro.Composition.SetBodyPageUsage("Long Name", false);
}
else{
FusionPro.Composition.SetBodyPageUsage("Short Name", false);
FusionPro.Composition.SetBodyPageUsage("Long Name", true);
}
Reply With Quote
 

Tags
fusionpro, javascript, onrecordstart

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 06:45 AM.


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