Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 19th, 2019, 10:51 AM
wellers_97 wellers_97 is offline
Junior Community Member
 
Join Date: Aug 2017
Posts: 23
Default Rule Help

I have a card that was created before my time that the customer is requesting a change to. It previously was a single sided card, and they are requesting a static back be added. In my mind this was a simple fix but I've been banging my head on this one. When I add the static back it somehow effects the Toll Free Field on the front. When "none" is selected for toll free, it's supposed to drop the tag and leave it blank. It does this just fine until I add the static back. I didn't touch the rules, or anything else just added the back and now it's returning "Toll Free: None" Any ideas?
Attached Files
File Type: zip golf card.zip (1.32 MB, 3 views)
File Type: zip golf card wAppointment Back.zip (1.46 MB, 4 views)
Reply With Quote
  #2  
Old February 19th, 2019, 04:08 PM
kjacobson's Avatar
kjacobson kjacobson is offline
Junior Community Member
 
Join Date: Oct 2008
Location: Alameda, CA
Posts: 49
Default Re: Rule Help

I opened up the file that had the backer included. Removed the number from the Toll-Free field and the Toll-Free label and the number disappeared (see screen shot attached). Is that how it is suppose to work?
Attached Images
File Type: jpg Capture.JPG (98.5 KB, 5 views)
__________________
Windows 7 | InDesign CC 2017 | Acrobat DC 2019 | FusionPro 10.1.9
Reply With Quote
  #3  
Old February 20th, 2019, 05:59 AM
wellers_97 wellers_97 is offline
Junior Community Member
 
Join Date: Aug 2017
Posts: 23
Default Re: Rule Help

It's not. I'm attaching a screen shot but there is a drop down where they can choose between 3 toll free numbers or then can select none. If "none" is selected, the tag should drop as well as the phone number and the extension.
Reply With Quote
  #4  
Old February 20th, 2019, 06:05 AM
wellers_97 wellers_97 is offline
Junior Community Member
 
Join Date: Aug 2017
Posts: 23
Default Re: Rule Help

Forgot the attachment
Attached Images
File Type: png Screen Shot 2019-02-20 at 8.47.35 AM.png (17.6 KB, 8 views)
Reply With Quote
  #5  
Old February 21st, 2019, 11:17 AM
kjacobson's Avatar
kjacobson kjacobson is offline
Junior Community Member
 
Join Date: Oct 2008
Location: Alameda, CA
Posts: 49
Default Re: Rule Help

Hi, not sure why the rule worked before you added the backer. I couldn't find anything in the code that would make it work as you described. That said, I was able to tweak the Phone Number Rule.

Revised code
I removed Toll Free from numbers and put in a condition to add it to numbers only if it isn't none or blank.
I included a condition in the for loop.
Code:
   var numbers =
  {
      "Office": Rule("Office Rule"),
      "Cell": Rule("Cell Rule"),
      "Fax": Rule("Fax Rule"),
  };
  
      if ((Field("Toll-Free")!="none") && (Field("Toll-Free")!="")) {
          numbers["Toll-Free"] = Field("Toll-Free")+Rule("Hide Ext Label Rule");
      }
  
  var result = [];
  for (var label in numbers)
      if ((numbers[label] != "none") && (numbers[label] != "")) {
          result.push(label + ": " + numbers[label]);
      }
  
  var delim = '<color name = "PANTONE 201 C"> • </color>';
  
  if (result.length > 2 && numbers['Toll-Free'])
      return result.splice(0,2).join(delim) + '<br>' + result.join(delim);
  //else
  return result.join(delim);
A couple of other changes you will need to make:
Remove the Hide Ext Label Rule from your Contact Info Frame
Add a space before 'ext' in your Hide Ext Label Rule
Code:
  if (Field("ext") == "")
  return "";
  else
   return ' ext.' +Field("ext");
On another note, there seems to be a lot of fields and rules that aren't being used, which is one of the reason this took a little while to figure out. You may want to remove the extra code to make it easier to update in the future.
__________________
Windows 7 | InDesign CC 2017 | Acrobat DC 2019 | FusionPro 10.1.9

Last edited by kjacobson; February 21st, 2019 at 11:27 AM..
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 09:16 AM.


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