- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 06:14 AM
I am trying to use a script in Performance Analytics to determine if a change request was done during business hours. (started after 9am). It seems like I should be able to get the hour from the Actual Start field, but I am getting a NaN error on the data collection for some of the records passed to the script. Can anyone give some suggestions on why simple code like this doesn't work? Thanks.
var hour = current.work_start.getHours();
var nhour = parseInt(hour.getByFormat('HH);
nhour should now have the hour of the Actual start time in number format?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 06:43 AM
Hi @Michael Johnsto ,
Why do you want to script when you instead just can utilize the condition builder:
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 06:43 AM
Hi @Michael Johnsto ,
Why do you want to script when you instead just can utilize the condition builder:
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 10:39 AM
Thanks, that is a good suggestion which should work in this case.