Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Field Mapping

NARASIMHA REDD5
Tera Contributor

Hi Team,
Good Morning.

"I am facing an issue with mapping the field from source to target. We have a 'monitor' field on the CMDB form. I attempted to map the value, but instead of 'true' or 'false', I am receiving '0' or '1'. How can I resolve this issue?"

 

NARASIMHAREDD5_0-1708756479669.pngNARASIMHAREDD5_1-1708756546000.png

 

22 REPLIES 22

Hi @NARASIMHA REDD5 ,

 

Try changing the value of choices in that field to 0 for false and 1 for true in that related list.

 

Thanks,

Allu Gopal.

@NARASIMHA REDD5 , Write Source Script as below and Map that to the Target 

var monite= source.Moniter.toString(); // Include correct Source field name

    if (monite== "1") {

        return true;

    } else if (monite== "0")

        return false;

 

Regards,

Shyamkumar '

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

Hi @shyamkumar VK ,
Thanks for your response. 

Still I am getting 0/1 Value.

@NARASIMHA REDD5 , Can you please Share Screenshot of the field Maps and where your Including this Script?

 

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

@shyamkumar VK  Please find below Screen shot.

NARASIMHAREDD5_0-1708942632080.pngNARASIMHAREDD5_1-1708942710153.png