Picture of Phone Number Format Script - Infigo Designer Advanced

Phone Number Format Script - Infigo Designer Advanced

Phone Number Format Script - Infigo Designer Advanced

We have a phone number format script that will allow you to change how your phone number will output for your template. 

**You need to enable Advanced Mode before proceeding with these steps. 

Step 1 - Update Advanced Mode

PC

This step is critical as it enables the advanced button to appear in the Javascript Management in Infigo Designer. 

First, you will need to enable another advanced mode in Infigo Designer. On your local machine, you will need to Run "regedit". 




From here, you will want to follow this path: HKEY_CURRENT_USER > Software > Mapsoft > InfigoDesigner. The third value from the bottom, called ShowAdvanced, right click on this. Press Modify, and in Value Data, type in 1. Press OK. 





 

MAC

Open [HDD] > Users > [User] > Library > Preferences > InfigoVI Preferences and set 'ShowAdvancedButton' value to '1',


If you do not see your the Library folder refer to these links:
http://osxdaily.com/2013/10/28/show-user-library-folder-os-x-mavericks/
https://discussions.apple.com/thread/3829938?tstart=0

 

Step 2 - Insert the JavaScript File into Infigo Designer


Now, navigate to  Infigo Designer > Javascript Managment. Click Advanced. 

mceclip0.png

 In the Event drop-down, change the event to Perform before groups.

mceclip1.png

Press Add, then paste in the javascript code from NotePad (or any other code editing program).

mceclip2.png

Next, change the event to User fired event, press Add. 

mceclip3.png

Paste in the code as you did before, then press OK.

mceclip4.png

 

Step 3 - Apply the Script to your Field


Press Infigo Designer > Predefined Javascripts. Hit Phone number script, then press Run Script.

mceclip5.png

Select the field you wish to apply this too, then select the format you need. Please note, items in Brackets [] are either local or global variables. If you are using a local or global variable field, please apply the script to that field. In the example, Phone1 is the text field and [Phone1] is the local variable. 

mceclip6.png

 



To check if the field has the formatting applied, navigate to the field (or local or global variable), and in the Properties tab, you will see a PhoneNumberFormat field.


  mceclip7.png

Have more questions? Submit a request

2 Comments

  • 1
    Avatar
    Keegan Leonard

    Just in case anyone was like me and missed the java link. It is right above Haydyn's name at the bottom of the article.

    Slainte!

    Comment actions
  • 1
    Avatar
    Dean Moncaster

    "The third value from the bottom, called ShowAdvanced, right click on this."

    They mean "The third value from the bottom, called ShowAdvancedButton, right click on this."

    Edited by Dean Moncaster 
    Comment actions
Please sign in to leave a comment.

Incomplete