Transform Map for Checkbox field

vidhya_mouli
Giga Sage

I have a check box field in the target table. In the excel sheet we have field with True or False values. Transform map is unable to update the check box field. How will I do this?

1 ACCEPTED SOLUTION

Robert H
Mega Sage

Hello @vidhya_mouli ,

 

I'm assuming the values in the Excel sheet are spelled as "TRUE" and "FALSE".

Create a scripted Field Map as shown below. In my example I am using "u_knowledge" as the source field, replace this with the column name from your Excel sheet, prefixed with "u_".

answer = (function transformEntry(source) {

	return source.getValue('u_knowledge') === 'TRUE';

})(source);

RobertH_0-1743261242412.png

 

Regards,

Robert

View solution in original post

3 REPLIES 3

J Siva
Tera Sage

Hi @vidhya_mouli 

Please share the pic of your transform map field mapping, excel data and error (if anything).

Robert H
Mega Sage

Hello @vidhya_mouli ,

 

I'm assuming the values in the Excel sheet are spelled as "TRUE" and "FALSE".

Create a scripted Field Map as shown below. In my example I am using "u_knowledge" as the source field, replace this with the column name from your Excel sheet, prefixed with "u_".

answer = (function transformEntry(source) {

	return source.getValue('u_knowledge') === 'TRUE';

})(source);

RobertH_0-1743261242412.png

 

Regards,

Robert

Shivalika
Mega Sage

Hi @vidhya_mouli 

 

Update the checkbox field using string type, TRUE and FALSE and create an On After Transform script to check the value of source , if true, set rhe checkbox as true else false. That's how checkbox and yes/no type fields are updated. Make sure the Import Set Table has String type field. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY