[Vtigercrm-developers] WorkFlow Expression Syntax

Bernard Bailey bernard.bailey at timezone.co.nz
Wed Mar 16 02:39:10 GMT 2016


Hi developers,


I have been crawling very slowly along trying to figure out how to use the 
Workflow expressions, without any working examples of how the 'if then else' 
work available.

I created vtiger workflow 'Update Task Progress and Completion Date when 
Completed'.

I can successfully set Progress to 100% when the Status is changed to 
'Completed'.

I can set the Actual Completion Date to todays date (using the host server time 
which is 13 Hours behind)

I want to set the ActualStartDate with this:

If there is a date already in the startdate field, then use that date Else put 
todays date (correct at the localtime it was input) into the startdate field. 

And with the projecttaskhours field 

If the projecttaskhours field is empty, then update it with the content of 
cf_777 Else leave projecttaskhours with the existing value. 

Lastly how would I add the content of cf_777 to projecttaskhours.  (This is 
just an example.)

I think the expression function may be the best bit to work with here.

A quick answer would be to point me to a download which has more than this 
example:

if mailingcountry == 'India' then concat(firstname,' ',lastname) else 
concat(lastname,' ',firstname) end



Regards
Bernard G Bailey


More information about the vtigercrm-developers mailing list