Not capture output

IF STRINGKEY @data.SOURCE Contains “aa”
BLOCK:ConstantString
LABEL:aa
value = “aa”
=> CAP @aa
ENDBLOCK
END
IF STRINGKEY @data.SOURCE Contains “bb”
BLOCK:ConstantString
LABEL:bb
value = “bb”
=> CAP @bb
ENDBLOCK
END
IF STRINGKEY @data.SOURCE Contains “cc”
BLOCK:ConstantString
LABEL:cc
value = “cc”
=> CAP @cc
ENDBLOCK
END

why not capture. any one canhelp me ?

You have to declare a variable (even with an empty value) OUTSIDE of an IF statement and then do the assignment inside, otherwise it will just live inside the scope of the IF.

Can you give me example ? Thanks

SET VAR @aa ""
SET VAR @bb ""
SET VAR @cc ""

// and then your code below