Help with Compute
-
PARSE "<ACTIVE REWARDS>" REGEX "\\d" "[0]" Recursive=TRUE CreateEmpty=FALSE CaseSensitive=FALSE -> VAR "1" FUNCTION Constant "<1>" -> VAR "2" FUNCTION Replace ", " " + " "<2>" -> CAP "3" FUNCTION Compute "<3>" -> VAR "Total: "
Parsed variable | Name: ACTIVE REWARDS | Value: [$5 OFF, $5 off, $5 OFF] <--- Executing Block PARSE ---> Parsed variable | Name: 1 | Value: [5, 5, 5] <--- Executing Block FUNCTION ---> Executed function Constant on input [5, 5, 5] with outcome [5, 5, 5] Parsed variable | Name: 2 | Value: [5, 5, 5] <--- Executing Block FUNCTION ---> Executed function Replace on input [5, 5, 5] with outcome [5 + 5 + 5] Parsed variable | Name: 3 | Value: [5 + 5 + 5] <--- Executing Block FUNCTION ---> ERROR: Cannot find column [5 + 5 + 5].
Seems to be no matter what i do I cannot get compute to function correctly.. What am I missing ???
-
You have to use UTILITY block, in the List group there is the Join function. It will join items of a list (in your case the name of the list is
1
) using a given separator, in your case you want the+
. Your method works as well but you have to replace [ and ] with nothing because otherwise the compute block thinks it's an excel cell or something.
-
@Ruri TY!! Been banging my head I knew it was something simple