The CreatorCon Call for Content is officially open! Get started here.

How I translate yes/no to true/false when importing?

vince591
Mega Contributor

I'm importing a csv file which has yes as a value for a checkbox field.   However, SN has True/False.   How do I interpret that?

1 ACCEPTED SOLUTION

No problem. If my answer works for you, please mark it as correct


View solution in original post

9 REPLIES 9

Jamsta1912
Tera Guru

Hello Vincent,


In your field map, tick 'Use source script', and enter a script something like this:



if (source.u_sourcefieldname == 'yes'){


answer = true;


else{


answer = false;


}



The variable 'answer' is the value that gets written to your target field.



Hope that helps,


Jamie.


Oops... I missed out the first close curly bracket! Put a } at the end of line 2


Jamsta,




Thanks,




Vince


No problem. If my answer works for you, please mark it as correct