PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01/12/2015 4:12 PM by  Srini Rao
IPD Java Script
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Srini Rao
Private
Private
Veteran Member
(287 points)
Veteran Member
Posts:133


Send Message:

--
01/12/2015 3:08 PM

    Hello, I'm creating a process flow to clean phone numbers in Landmark system.

     I'm trying delete any special characters in phone filed , I used the following java script for my assigned node..

    vPhone = fld.LEMPhone.replace(/[\(\)\.\-\ ]/g, '')

     I get the following error....

    Activity completed: Start

    Activity started: Assign1400  (Run Id: 5)
    Activity Assign1400: Error evaluating expression: vPhone = fld.LEMPhone.replace(/[\(\)\.\-\ ]/g, '');
    vPhone =
    Variables in Process:
    vPhone =

    Please Advise.

     


     

    Greg Moeller
    Private
    Private
    Veteran Member
    (3873 points)
    Veteran Member
    Posts:1377


    Send Message:

    --
    01/12/2015 3:14 PM
    Check that vPhone has something in it before you attempt the action on it. Looks to me like you are getting null phone number and it is complaining about that.
    Srini Rao
    Private
    Private
    Veteran Member
    (287 points)
    Veteran Member
    Posts:133


    Send Message:

    --
    01/12/2015 3:24 PM
    Hi Greg,
    vPhone is empty but LEMPhone is populated with value.

    Started locally: Jan 12, 2015 3:23:51 PM CST

    Process started: TestPhoneSrini (Run id = 40) - 01/12/2015 15:23:51

    Activity started: Start (Run Id: 24)
    Executing Start Activity...
    LEMPhone = 111-222-3333
    vPhone =
    Variables in Process:
    LEMPhone = 111-222-3333
    vPhone =

    Activity completed: Start

    Activity started: Assign1400 (Run Id: 11)
    Activity Assign1400: Error evaluating expression: vPhone = fld.LEMPhone.replace(/[\(\)\.\-\ ]/g, '');
    vPhone =
    Variables in Process:
    vPhone =

    Activity completed: Assign1400

    Activity started: End (Run Id: 19)
    Activity End: Executing End activity
    End_errorCode = 0
    End_informationCode = 0
    End_returnMessage =
    End_outputData =
    Activity completed: End
    Process completed - 01/12/2015 15:23:51

    Process ran successfully
    Information code: 0
    Return message:
    Output data: (null)

    Finished: Jan 12, 2015 3:23:51 PM CST
    Srini Rao
    Private
    Private
    Veteran Member
    (287 points)
    Veteran Member
    Posts:133


    Send Message:

    --
    01/12/2015 4:12 PM
    I changed Java Script to vPhone = LEMPhone.replace(/[\(\)\.\-\ ]/g, '') and it Worked.

    Thanks
    ---Srini


    You are not authorized to post a reply.