- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 08:17 AM
Hello,
it's probably super simple but i just don't see it:
I have a flow where one of the flow variables is "effort" with an integer value, representing the effort spend on a task in seconds. Now I want to create a task_time_worked record in the flow.
I get the record created, the user and the task set properly, but for whatever reason, I can't set the time on the record (test runs always come out with time_worked [and/or time_in_seconds] as 0).
I use a script to assign the value to the (duration field) time_worked:
var tWDint = fd_data._1__get_fcr_status.effort*1000;
var timeWorkedDuration = new GlideDuration(tWDint);
return timeWorkedDuration;
task=xxx
user=xxx
time_worked=4 Minutes
coalesce_fields=
What am I missing?
Thanks,
Christian
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 10:09 AM
see if you can use
return timeWorkedDuration.toString();
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 08:33 AM
Hi @Christian Prob2 ,
Can you try like below:
return timeWorkedDuration.getDisplayValue();
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 10:05 AM
Thanks, but that does not work either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 10:09 AM
see if you can use
return timeWorkedDuration.toString();
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 12:40 PM
As a follow up note - I ended up logging a ticket with SN support - imho it should work if you have a flow variable of type duration and then assign it to the task_time_worked.time_worked field, which is of type duration. Support confirmed it is not working ootb. I'll update if I hear more details.