# Date selected on form, assign task to user when date and time is reached.

**URL:** <https://community.ofelia.com/t/date-selected-on-form-assign-task-to-user-when-date-and-time-is-reached/7867>\
**Category:** Q&A\
**Created:** [14 October 2016 17:16 UTC](https://community.ofelia.com/t/date-selected-on-form-assign-task-to-user-when-date-and-time-is-reached/7867 "2016-10-14T17:16:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yunebraxkyu\_1](https://avatars.discourse-cdn.com/v4/letter/y/54ee81/32.png) [@yunebraxkyu\_1](https://community.ofelia.com/u/yunebraxkyu_1)\
**Post date:** [14 October 2016 17:16 UTC](https://community.ofelia.com/t/date-selected-on-form-assign-task-to-user-when-date-and-time-is-reached/7867/1 "2016-10-14T17:16:51Z")

</div>

Dear Sir/Mdm,

I have a form with date and duration (time) widget. I want to know when the user set a date and time in the widget, he/she can trigger the next task to user on the date time he/she select? Can it be done?

Thanks!

🙂

---

<div class="post-metadata">

**Author:** ![mbarrantes](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@mbarrantes](https://community.ofelia.com/u/mbarrantes)\
**Post date:** [14 October 2016 18:26 UTC](https://community.ofelia.com/t/date-selected-on-form-assign-task-to-user-when-date-and-time-is-reached/7867/2 "2016-10-14T18:26:25Z")

</div>

By trigger next task, its like submitting the current task. Whats the point of your question? Do you want a dashboard to control activities?

---

<div class="post-metadata">

**Author:** ![kiran.neupane](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@kiran.neupane](https://community.ofelia.com/u/kiran.neupane)\
**Post date:** [24 October 2016 21:09 UTC](https://community.ofelia.com/t/date-selected-on-form-assign-task-to-user-when-date-and-time-is-reached/7867/3 "2016-10-24T21:09:10Z")

</div>

Hi,

Once the new date and time is entered you need to calculate the duration between the current time and the date and time entered.

Eg:  
duration = enteredDateTime - Current System Datetime

This can be done in groovy script and you can assign this duration to a variable.

Now you can set a timer to trigger an event after this duration. Which will tirgger process for you.

PS. Mask as helpful tick if this solves your problem.

---

<div class="post-metadata">

**Author:** ![yunebraxkyu\_1](https://avatars.discourse-cdn.com/v4/letter/y/54ee81/32.png) [@yunebraxkyu\_1](https://community.ofelia.com/u/yunebraxkyu_1)\
**Post date:** [14 October 2016 19:18 UTC](https://community.ofelia.com/t/date-selected-on-form-assign-task-to-user-when-date-and-time-is-reached/7867/4 "2016-10-14T19:18:34Z")

</div>

Hi !.

It is like a schedule,

the User chooses the date (date widget) and time (duration widget), and the next task will be launched with what he chose in form.

🙂

---

<div class="post-metadata">

**Author:** ![yunebraxkyu\_1](https://avatars.discourse-cdn.com/v4/letter/y/54ee81/32.png) [@yunebraxkyu\_1](https://community.ofelia.com/u/yunebraxkyu_1)\
**Post date:** [14 October 2016 19:24 UTC](https://community.ofelia.com/t/date-selected-on-form-assign-task-to-user-when-date-and-time-is-reached/7867/5 "2016-10-14T19:24:42Z")

</div>

With the variable type date as a condition in the intermediate time, I managed to do this with the built-date with the time (yyyy / mm / dd HH: mm: ss), but I’d like to do it separately using the duration widget to set the time that the User wants.

how can I make it?

Thanks!

---

<div class="post-metadata">

**Author:** ![mbarrantes](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@mbarrantes](https://community.ofelia.com/u/mbarrantes)\
**Post date:** [14 October 2016 20:44 UTC](https://community.ofelia.com/t/date-selected-on-form-assign-task-to-user-when-date-and-time-is-reached/7867/6 "2016-10-14T20:44:58Z")

</div>

What about this idea

1. Radication form, or process
2. Flows to a human task assigned to the Coordinator.
3. Using a custom form, with your custom widget, as soon as the user confirms the assignation, you use REST API to execute that task.
4. The othe user has access to the next task

You cant change Assignation Date, but you can Reaasign a task
