Hello @coolwen22
Thank you very much for using our plugin. The code to use depends on the equation you want to implement. I’ll try to describe the process with two hypothetical examples.
Assuming you have the equation:
fieldname2+fieldname4+fieldname9+fieldname10
And you want to exclude the fieldname2 and fieldname4 from the sum if fieldname1 and fieldname3 are empty, respectively.
The equation can be implemented as follows:
IF(fieldname1|r == '', 0, fieldname2)+IF(fieldname3|r == '', 0, fieldname4)+fieldname9+fieldname10
The equation includes the IF operation and checks the raw values of fieldname1 and fieldname3 by using the |r modifier. In this first example, the alternative value is the number zero because it does not modify the sum result.
Now, if we use the multiplication instead of the sum operator:
fieldname2*fieldname4*fieldname9*fieldname10
The zero is not an alternative in this case because affects the result. The modification in this case would be:
IF(fieldname1|r == '', 1, fieldname2)*IF(fieldname3|r == '', 1, fieldname4)*fieldname9*fieldname10
Now the alternative value is the one.
Best regards.
Works like a charm! Thank you!