Load True/False data using Transform Maps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2020 06:31 AM
I have true/false fields on my excel file . After I loaded the data correctly, I run the transform map and the True/False fields are not being populated. I looked online for scripts to help with this problem and I tried a few scripts but nothing works. On the excel file, the true/false fields are yes/no in excel. This is my script so far and it didn't work,
answer = (function transformEntry(source) {
if (source.u_released == "yes") {
return true;
if (source.u_released == "no") {
return false;
})(source);
u_released is the source field
But on of the resource tells like
"" source released field equals to the string of yes then mark the Boolean in target field as true ""
But i am not sure what it means. i tried various scripts but still it is show as false

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2020 06:39 AM
Please try this,
If my answer is impacted then please mark correct and helpful.
Thanks
Tanushree

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2020 06:39 AM
Hello Aishwarya,
What is the data type of the target field that is mapped to u_released?
- Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2020 07:24 AM
Boolean type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2020 06:48 AM
Can you try?
answer = (function transformEntry(source) {
if (source.u_released.toLowerCase() == "yes") {
return true;
if (source.u_released.toLowerCase() == "no") {
return false;
})(source);
Please mark my response as correct and helpful if it helped solved your question.
-Thanks