The CreatorCon Call for Content is officially open! Get started here.

Compare date fields.

Taaha M
Tera Contributor

I have one date field on “dmn_demand” table and other on “dmn_demand_task” table.

The field “Planned Start Date” on Demand table should not be after “Due date” on Demand Task table.

13 REPLIES 13

@Taaha M , Did my answer helped you in any way?

If my answers given earlier were helpful then Please Mark this solution as accepted and helpful as it will be helpful for other users as well.
Best Regards.
Saurabh V.

Hi @Taaha M , Hope you are doing well. Did my answer helped you??

If my answers given earlier were helpful then Please Mark this solution as accepted and helpful as it will be helpful for other users as well.
Best Regards.
Saurabh V.

Hi @Taaha M , Hope you are doing well, Did my solution helped you in any way?

If my answers given earlier were helpful then Please Mark this solution as accepted and helpful as it will be helpful for other users as well.
Best Regards.
Saurabh V.

Nawal Singh
Giga Guru

Hi @Taaha M ,

You Can Compare Two Date Fields in a Business Rule like this-

 

var plannedStart = current.demand.planned_start_date;  // From parent Demand
var dueDate = current.due_date;                        // From current Task

if (plannedStart && dueDate && plannedStart > dueDate) {
    gs.addErrorMessage('Planned Start Date cannot be after Due Date.');
    current.setAbortAction(true);
}

 

If you found my response helpful, please mark it as helpful and accept it as the solution.

Thank you
Nawal Singh