Hi everyone,
I am using a batch macro to calculate various of data, and get the total based on the original textinput.
The correct output should be
first row: 0
second row:1740690.34
third row:366326.97
But it shows below:
The workflow:
Parameter:
Thank you.
Solved! Go to Solution.
You first action tool isn't configured at all. You need to configure that if you want to swap out the formula via the batch macro.
Hi, can you give me more details about my first tool?
I am not sure which step you mention about.
Do you know how I can make my formula work?
Thank you in advance.
Hi @Lichunhuang
You don't select the "Value or Attribute to Update". So designer can't know which attribute should be update.
Please select the attribute. I think the below is the correct.
Hi,
I have tried it again, but it didn't work.
Hi @Lichunhuang ,
I rewrited the Formula tool's parameter directly within macro, but the result is not that you showed.
If you input these parameter into the 1st Formula tool, what expression is you expected.
Now is as follow expression.
if CONTAINS([AG],"CU")
then"Yes"
else "NO"
endif
If you Input parameter is [RW], what is that you expected?
hi @Lichunhuang
Before running the batch macro, if you run one single instance of the calculation using the standard workflow, did you get the expected results for that one instance?
Yes. It works for the single one, but it cannot show the right answer while running the batch macro.
The "New sumup" column([RW],[BK],ABS[BN] - [RB])), is a parameter which determine which column to use in input2
The "Right_1" column is another parameter to determine which formula to use,
In batch marco :
if CONTAINS([AG],"CU")
then'Yes'
else 'No'
endif
CONTAINS([AG],"CU") should be replace by other formula in "Right_1"
for example, in text input, "new sumup" = [RW], "Right_1"= !CONTAINS([AG],"CA") and !CONTAINS([AG],"CC")
These two parameters will be used in batch marco as formula as below:
filter column "AG" in input2 that doesn't contains "CA" and "CC", then sum up column "RW"
But it seem the formula cannot be replace in batch macro.
Is it clear?