Need to use my source data "active" field to deactivate users on the sys_user table

User339333
Tera Contributor

I need guidance on how to update a field map script in a Transform map that I would like to utilize to deactive users in the sys_user table. I need to tell this field map to update the "Active" checkbox on the sys_user table when there is an "N" in the "active" field from the source. The other choice for this field is "Y"

1 ACCEPTED SOLUTION

Anand Kumar P
Giga Patron
Giga Patron

Hi @User339333,

In transform map field active check source script checkbox and write below script 

if(source.active == ‘Y’){
return true;

}else if (source.active==‘N’){
return false;

}
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand

View solution in original post

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

Try the following in your field map script

if(source.u_active=='Y'){
target.active=true;
}
else if(source.u_active=='N'){
target.active=true;
}

Hope this helps.

Anand Kumar P
Giga Patron
Giga Patron

Hi @User339333,

In transform map field active check source script checkbox and write below script 

if(source.active == ‘Y’){
return true;

}else if (source.active==‘N’){
return false;

}
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand