AnsweredAssumed Answered

create a customer script for mapping it will see if a value matches and if yes then replace the output value

Question asked by lance.prais559614 on Apr 27, 2017
Latest reply on May 4, 2017 by apatel@diligent.com

I am trying to create a customer script for mapping it will see if a value matches and if yes then replace the output value to another.Example with Groovy Custom Script mapping

 

Have tried Groovy and JS with no luck

Input ProjectType, Project_ID

Output Project_ID_T_M

 

Grrovy

if (ProjectType.contains('[TM]'))
{

Project_ID_T_M = Project_ID;}

 

JS

var Project_ID = Project_ID;
var ProjectType = ProjectType;
var Project_ID_T_M = "";
if (ProjectType.match(/^.*TM$/)){
Project_ID_T_M == ProjectType}

 

Then end result is Project_ID_T_M is Null

 

Thank you

 

 

Outcomes