I am uploading the Excel, Based on the "Vendor Status" field value, updates the Active field status

Prabhu6
Tera Guru

Hi Experts,

 

I am uploading data(Excel) to the company table; I need to change the Active state(false) if the Vendor status field value naming is "Inactive."

 

Could you please provide the solution and script?

 

Thank you

Prabhu

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Prabhu6 

 

Greetings!!

 

You need to write the Transform script and check. I am not a coder, but you can get the base line script on community.

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Appanna M
Tera Guru

Hello @Prabhu6 ,

 

You can create a transform map and achieve this,

 

Below is the sample code: 

 

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
 // Add your code here
if (source.vendor_status== 'Inactive') {
target.active == false;
//target.update();
}

})(source, map, log, target);

 

 

Please Mark My Answer as Helpful and Accept as Solution, if you find this article helpful or resolves your issue.