I have the weirdest thing here:
I created some workflow expressions, none of them worked. I created this one just for testing:
Keep in mind, the salesorder no. is correct for the SO I'm testing. So I would expect the expression to evaluate to 'A'. But when I use 'evalwf.php' on it, I get this query:
The second to last where clause should check for 'A', not 'B'. It's like every expression I write results in the 'else' clause. What am I doing wrong?
Hmm, it looks like the workflow is working when I test it. The eval script doesn't do a live check maybe?
By the way, I used a little trick to check the week, since 'smaller then' was not available:
I used the field 'so_productionyear' for comparison to check against (using 'is'). Then I used:
So basically, when then productionweek is in the past, I made productionyear check if it was itself, otherwise I returned something that will never be true ('1000').
I created some workflow expressions, none of them worked. I created this one just for testing:
Code:
if salesorder_no == 'ORD1800484' then 'A' else 'B' end
Code:
SELECT vtiger_salesorder.salesorderid FROM vtiger_salesorder INNER JOIN vtiger_crmentity ON vtiger_salesorder.salesorderid = vtiger_crmentity.crmid WHERE vtiger_crmentity.deleted=0 AND ( (( vtiger_salesorder.so_productionyear = '2018') and ( vtiger_salesorder.so_productionyear = 'B') )) AND vtiger_salesorder.salesorderid > 0
Hmm, it looks like the workflow is working when I test it. The eval script doesn't do a live check maybe?
By the way, I used a little trick to check the week, since 'smaller then' was not available:
I used the field 'so_productionyear' for comparison to check against (using 'is'). Then I used:
Code:
if so_productionweek < format_date(get_date('today'),'W') then so_productionyear else '1000' end