IPD Java Script

 3 Replies
 1 Subscribed to this topic
 32 Subscribed to this forum
Sort:
Author
Messages
Srini Rao
Veteran Member Send Private Message
Posts: 149
Veteran Member

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
Veteran Member Send Private Message
Posts: 1498
Veteran Member
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
Veteran Member Send Private Message
Posts: 149
Veteran Member
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
Veteran Member Send Private Message
Posts: 149
Veteran Member
I changed Java Script to vPhone = LEMPhone.replace(/[\(\)\.\-\ ]/g, '') and it Worked. Thanks ---Srini