Jump to content

MM4_Dawn

Registered Users - Approved
  • Posts

    6
  • Joined

Converted

  • Location
    Maryland

Converted

  • Occupation
    Project Manager

Converted

  • FusionPro Products
    Yes

Converted

  • FusionPro VDP software version
    v9.1.0

Converted

  • OS
    Mac OS 10.8, Windows 7

Converted

  • Acrobat Version
    Acrobat X (10)

MM4_Dawn's Achievements

Rookie

Rookie (2/14)

  • First Post Rare
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter Rare

Recent Badges

10

Reputation

  1. I wanted to see what MIS you guys are tying in successfully with MarcomCentral to automate the workflow in your shops. I am looking into new MIS software and anything that is compatible right out of the gate without a 3rd party solution would be preferred. Any pros/cons of any systems or names of what you use would be great so I have more to check out. Thank you in advance! Dawn
  2. David, Thank you for the quick reply and for the reference pages. What you suggested solved the spacing issue. Once I get more fluent I will pay the favor back in helping others. Thank you again for the help! Dawn
  3. Thank you so much for your help. Both have worked like a charm and I have been able to manipulate them for most of my needs. I have one that the spacing is showing correctly in the validate but not in the preview. Can anyone spot what error I am making for this to not show correctly? It should be two spaces between the telephone, fax and mobile like this: T 000_000_0000 F 000_000_0000 M 000_000_0000 But it is showing instead like: T 000_000_0000F 000_000_0000M 000_000_0000 Here is the code I am using: var telField = Field("telephone"); // Replace with your field name var faxField = Field("fax"); // Replace with your field name var mobileField = Field("mobile"); // Replace with your field name // Array of numbers and tags var numbers = [["T ",telField],["F ",faxField],["M ",mobileField]]; // Remove elements that don't have a phone number from the array numbers = numbers.filter(function(s){return s[1];}); // Add color tags, format numbers, & add space between labels/numbers for (var i=0; i<numbers.length; i++){ numbers[i][0] = '<f name="Akzidenz-Grotesk Std Med">' + numbers[i][0] + '</f>'; numbers[i][1] = '<f name="Akzidenz-Grotesk Std Light">' + formatPhone(numbers[i][1]) + '</f>'; numbers[i] = numbers[i].join(" "); } // Join with 2 spaces return numbers.join(" "); //=============================================================== // // DON'T EDIT BELOW THIS LINE // //=============================================================== function formatPhone(num){ var Var1 = num; var formatStyle01 = "$1_$2"; //simple 7 digit phone var formatStyle02 = "$1_$2_$3"; //simple 10 digit phone var formatStyle03 = "+$1 $2_$3_$4"; //10 digit phone starts with 1 var formatStyle04 = "$1_$2_$3 ext.$4"; //10 digit phone with extension var formatStyle05 = "+$1 $2_$3_$4 ext.$5"; //10 digit phone starts with 1 with extension var formatStyle06 = "$1_$2 ext.$3"; //7 digit phone with extension var thisNumber = Var1; return formatNumber(Trim(thisNumber)); function formatNumber(number01){ var pattern01 = /^(\d{3})[^\d]*(\d{4})$/; var pattern02 = /^[\D]*(\d{3})[\D]*(\d{3})[\D]*(\d{4})$/; var pattern03 = /^\+?(\d{1})[\D]*(\d{3})[\D]*(\d{3})[\D]*(\d{4})$/; var pattern04 = /^[\D]*(\d{3})[\D]*(\d{3})[\D]*(\d{4})\D*[x#n]\D*(\d+)$/; var pattern05 = /^\+?(\d{1})[\D]*(\d{3})[\D]*(\d{3})[\D]*(\d{4})\D*[x#n]\D*(\d+)$/; var pattern06 = /^(\d{3})[\D]*(\d{4})\D*[x#n]\D*(\d+)$/; var patternEndExt = /(.)[x#n](.)/; var patternStart1 = /^[\D]*[1]/; if(number01.match(pattern01)){ number01 = number01.replace(pattern01, formatStyle01); return number01; } else if(number01.match(pattern02)){ number01 = number01.replace(pattern02, formatStyle02); return number01; } else if(number01.match(pattern03)){ if (number01.match(patternStart1)){ number01 = number01.replace(pattern03, formatStyle03); return number01; } else { return number01; } } else if(number01.match(pattern04)){ number01 = number01.replace(pattern04, formatStyle04); return number01; } else if(number01.match(pattern05)){ number01 = number01.replace(pattern05, formatStyle05); return number01; } else if(number01.match(pattern06)){ number01 = number01.replace(pattern06, formatStyle06); return number01; } else { return number01; } } }
  4. Thank you so much for your help! Any chance you want to help me modify it for another? I really need to learn my js better as my attempt at modifying was a fail. My intentions are the same as the one above but it is 3 stacked numbers this time and the divider is in a different color: p | 412.322.9280 d | 412.716.7668 m | 412.716.7668 If you have any recommended resources for JS classes let me know. Thanks again, Dawn
  5. I apologize for not being clear. My data fields are: office, mobile and fax. Not all people have all 3. When I talk about my spacing being off I have 5 spaces between office/mobile and 5 spaces between mobile/fax so if the user does not have a mobile it leaves 10 spaces between them when I only need 5. I am using the the following rules: -Office tag removed when no number is in the office field. -Office number formatted to 000.000.0000 formatting. -Mobile tag removed when no number is in the mobile field. -Mobile number formatted to 000.000.0000 formatting. -Fax tag removed when no number is in the fax field. -Fax number formatted to 000.000.0000 formatting. Now I started using the prebuilt rules in FusionPro but had to have the Mobile/Office/Fax tag edited so the number was not populated after the tag since I needed the number in a different PMS color and I needed the number formatted with the periods instead of dashes. Does this make more sense now? Because I am doing it this way it does not remove the extra spacing between the fields if the user does not user one of the fields but I am not sure how to combine the tag rule, the number formatting rule and make the word "office" red and the "000.000.0000" gray in the formatting so it all works in harmony. If this is still confusing I will send it through my BRM but I was hoping this would be simple. Thank you for your help! Dawn
  6. I am having trouble on the javascript of a template and I am beginner in JS so I apologize if this is obvious and I am not seeing it. The line I need to end up with is a gray and PMS red that looks like this: office 123.456.7890 mobile 123.456.7890 fax 123.456.7890 I get the color results I want using a combination of Hide Phone Number Label Rule for the tag only and using Phone Format Rule for the number only. If I remove a number my spacing is off. Is this the best way to do it? What JS do I need to remove the spacing between the numbers if they are not used? Ideally, I would have this all under the hide phone number rule to display the phone number too but I don't know how to also handle splitting it up between two PMS colors and putting a rule on the phone number for periods between the numbers. Does anyone have any suggestions? Thank you! Dawn
×
×
  • Create New...