I want to use the tool intersects in the field calculator. If the condition is true, I want to set a result field to a specific number. The field calculator doesn't accept my expression but I can not find the reason for the error. Can you please help me.
CASE WHEN intersects('layer1', 'layer2') = true THEN 1 WHEN intersects('layer1', 'layer3') = true THEN 2 END
the error says:
syntax error, unexpected NUMBER_INT, expecting WHEN or ELSE or END syntax error, unexpected END, expecting $end
I work with QGIS 3.4 (Madeira)