- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2015 11:02 AM
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2015 01:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2016 09:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2016 07:46 AM
Mussie,
If you have control over your import data, make the source value 'Yes' and use the original script.
If you don't have control over your import data, then most likely, the source is among the following plausible values;
all upper case (YES), all lower case (yes), or Proper case like your test (Yes)
Expand your if test to include the above:
if (source.u_staff == 'Yes' || source.u_staff == 'YES' || source.u_staff == 'yes') {
answer = true;
else {
answer = false;
}
I'm sure somebody else out there might have a simpler solution but this should do the trick for now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2016 08:41 AM
I forgot this after the if test and before the end of the function:
return answer;
})(source);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2016 03:19 PM
Thanks Vincent, that did the trick. I some how forgot to put the below code at the end of the function.
return answer;
Thank you for your help.
Mussie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2016 04:58 AM
Mussie,
You're welcome. Glad I could help.
Vincent.