Using script giving condition to wait for condition action in flow designer
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2024 06:06 AM
Hi Team,
Using the script I am given condition to wait for condition action , below script i am used
var date = new GlideDate();
var vk =fd_data.trigger.request_item.variables.end_date.getValue();
if(vk<=date){
return true;
}else{
return false;
}
But i am facing issue"class java.lang.Boolean cannot be cast to class java.lang.String (java.lang.Boolean and java.lang.String are in module java.base of loader 'bootstrap') in flow designer"
If I used instead of return true , answer = true error not coming but scenario is not working. If any one knows abt this issue could pls help me on this
Advance thanks,
Team.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2024 06:25 AM
Hi @Venky Kshatriy2
Try Below Script
var currentDate = new GlideDateTime();
var endDateValue = fd_data.trigger.request_item.variables.end_date.getValue();
var endDate = new GlideDateTime(endDateValue);
if (endDate <= currentDate) {
return true;
} else {
return false;
}
Thank you
Esh