Happy Business Starts Here

Debug Workflow liquid syntax

0 Kudos

Debug Workflow liquid syntax


When i run below code in liquide sandbox (https://jumpseller.com/support/liquid-sandbox/) its working fine.


{% assign ChkCrrTotUsg = 1000 %}
{% assign FetchTotUsg = 2600 %}

{% if ChkCrrTotUsg == 0 and FetchTotUsg > 1000 %}
{% assign cTotalUsage = FetchTotUsg | minus: 1000 %}
{% else %}
{% assign cTotalUsage = ChkCrrTotUsg | plus: FetchTotUsg %}
{% endif %}


But when i try to run it in workflow "logic-if" it keeps throwing following error.

[ If statement evaluated to ''. Only 'True' and 'False' are acceptable evaluations.]

I think its some simple mistake i am doing, but hard for me to figure it out in workflow.




Check the "Skip Validation" option on the task and then click Update.



Valued Scholar

That your liquid code executes fine the liquid sandbox does not mean it apply to rules of the Logic:if task. The logic:if task requires that the result/output of liquid code is either a "True" or "False" string. Your liquid code results in the value of ChkCrrTotUsg to be returned.  ( Your code is missing a curly closing bracket: => {{ChkCrrTotUsg}}  ).


The skip validation option has no effect.

Valued Scholar

There's a closing bracket missing at the end : 

{{ChkCrrTotUsg} }