3 Replies Latest reply on Jun 7, 2010 4:54 PM by philmodjunk

    Script Help

    schnook

      Title

      Script Help

      Post

      Hello all'

       

      Am having trouble with the script below. Any help would be great.

       

      Let(

       

      @NumbersOnly = TextFormatRemove(Filter(Phone_Mobile; "0123456789"));

       

      Case(

       

      Length(@NumbersOnly) = 10;

       

      Left(@NumbersOnly; 4) & "-" &

       

      Middle(@NumbersOnly; 3; 3) & "-" &

       

      Right(@NumbersOnly; 3);

       

      Length(@NumbersOnly) = 8;

       

      "07-" &

       

      Left(@NumbersOnly; 4) & "-" &

       

      Right(@NumbersOnly; 4);

       

      ))

       

      The blue bit seem to be working what it does is put an area code in front of a home phone number e.g.. 07-4341-3689.

       

      The bit i am having trouble with is the bit above the blue text, What this is supposed to do is e.g.. 0498-454-768.

       

      But if i enter a mobile phone number say 0401257687, is should look like this 0401-257-687, But it come out like this 0401-017-687 it is replacing the first 2 numbers in the Middle Numbers with that of the last 2 Numbers in the Left Numbers. Hope this makes sense.

       

      Any ideas???

       

      I am using Filmmaker Pro 11 Advanced on a Windows XP PC with Service PC 3.

       

      Regards

      schnook