- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 10:23 AM
Hi everyone,
how can i program this better, i want to be able to convert the string into lowerCase and then search for the lowercase sub sting in the If Statement
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 10:51 AM - edited 02-28-2024 10:51 AM
If condition updated.
make sure the variable afa returning string type value [ not an object type ]
in case, afa is returning Object, then add .toString().toLowerCase();
answer = ifScript();
//
var proBono = current.variables.afa.toLowerCase();
function ifScript() {
if (proBono.indexOf('pro bono') > -1 ) {
return 'yes';
}
return 'no';
}
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 11:01 AM
getting an error message on the workflow when i am testing it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 11:08 AM
error must be about toLoweCase();
try with toString().toLowerCase();
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 11:14 AM
no luck still getting the error message