Ability to have date type in the Case statement - Rules engine



The out data type here is limited to number, string and boolean. But we have encountered multiple usecases where the final out put fields needs to a date based on set of conditions/criteria.

Is this something in road map?

This ability to have date type in the case statements is not a possibility in Data Designer also.

If we can have the ability then it would be super helpful

Hi @shivani 

This is a good idea. Can you also add some usecases that you might want to accomplish with case and dates?

Company has sales orders and change orders to the original sales order. Sales order always has a service start and service end dates. Change order should have the same but not always depending on the reason for the change order.

If I’m pulling products out of the change order and need to have the service start and end date then the logic would be:

If change order service start date is null
then sales order service start date
else change order service start date

Same for service end date

Here is another use case. I’m trying to unify 2 data sets in rules, and I need to aggregate a date field. If one dataset has null value in the date field, then I want to use the date from the other dataset so that the result is a single date field to be inserted in a custom object. 

NVL or coalesce would be great to have too. It would solve for this use case.