We continue our series of interesting support questions to help you customize your EvolutivoFW application.
Empty date fields in workflow email.
I've implemented a simple workflow that sends an email every time I save a record with some conditions. The email has a date field which may be empty. When the date is empty or null, the email will appear with the current date instead of an empty value. If the field has a value, the email appears correctly.
I tested this now (June 2025) and it doesn't happen anymore. If the date field is empty, there is no value set in the email, so I suppose we fixed it at some point. In any case, to prevent this, we must use a conditional expression inside the workflow's email template. Here’s how you can do it:
Custom Date Field which may be empty: $cf_722
Custom Date Field with expression check: $(general : (__WorkflowFunction__) if cf_722 == '' then 'No Date Set' else cf_722 end )
Using the evalwf
tool this appears like this:
Feel free to replace "No Date Set" with any text you prefer.
Notify on related record condition.
I need to check and either block the save operation or send an email to a user if an Opportunity is closed without a related Service.
You can handle this logic using a Validation Business Map or a workflow.
First, let's do the email notification because we will be using the same condition for the validation map. Creating a workflow that sends an email or any of the other notification options EvolutivoFW has is well documented and discussed, the important part of this request is setting the correct conditions to trigger the workflow.
I came up with two ways to detect if the record being saved has related Services or not, there are probably other ways. The first way is counting the number of related IDs with the expression array_count(getRelatedIDs('Services'))
The other is getting an aggregated string concatenation of any mandatory field in the related module with the expression aggregation('group_concat', 'Services', 'servicename')
The workflow conditions would be:
Now let's block the save operation using that same workflow expression inside a validation map.
Map Name Potentials_Validations
Map Type Validations
Map
<map>
<originmodule>
<originname>Potentials</originname>
</originmodule>
<fields>
<field>
<fieldname>sales_stage</fieldname>
<validations>
<validation>
<rule>expression</rule>
<restrictions>
<restriction>checkRelatedServices</restriction>
</restrictions>
<message>Please select a related Service first.</message>
</validation>
</validations>
</field>
</fields>
</map>
Map Name checkRelatedServices
Map Type Condition Expression
Map
<map>
<expression>if sales_stage == 'Closed Won' then array_count(getRelatedIDs('Services')) else 1 end</expression>
</map>
We probably could have done the expression with an AND function also, either way, you can ensure that business rules are enforced automatically and team members stay informed.
Endless possibilities!
EvolutivoFW is not just flexible – it’s practically limitless in how you can shape it to your business needs.