- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 11:44 AM
Hi All,
Does anyone know how to handle boolean values??
I want to import users from excel file including target "active" field in the user table. I have created below script, but i don't know why is does not working correctly?.
Source field has a string format.
if (source.u_active == 'true') {
target.active = true;
} else if (source.u_active == 'false') {
target.active = false;
}
I would be grateful for any anwers.
Best Regards
Artur
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 05:40 PM
All you should have to do is change 'target.active = true' to 'answer=true' (same with false).
However, I agree with Mark. That is something probably best addressed in the script field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 01:43 PM
I think the problem is that you are using the 'Source script' functionality (which is intended to set a value back to the 'source' field. If you moved your script into the main transform map 'Script' field I think it would work better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 05:40 PM
All you should have to do is change 'target.active = true' to 'answer=true' (same with false).
However, I agree with Mark. That is something probably best addressed in the script field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2014 02:29 AM
Thank you both!!!, I have used "answer' instead of " target" and now it's working as I expected.