I have multiple filter and formula tool in workflow with date which has to be updated; basically first date of every month for every consecutive run. So I am using control parameter and update value action to do this. However batch macro is unionising records of output after every run which i dont want is there a way to achieve this? (the date was being changed manually earlier and now it is changing dynamically so a lot of calculations in the workflow are based on earlier flow that why i dont need the union part to be happening)
I will provide a few of my own guesses based on what's been shared thus far as possible workarounds/solutions. It does sound like your workflow is complicated, which is why being very specific will help and even providing a sample input and output (maybe even 2 outputs for what you see vs. desired output) with dummy data would help clarify things further.
Case 1: Batch macro is outputting duplicated results that are unexpected.
Case 2: Batch macro is not outputting duplicate records. But duplicate records are still being produced.
Case 3: This has become a bigger problem than it ever needed to be.
@CoG - one addendum to your excellent summary - for Case 2- the problem could be the CONTROL PARAMETER feeding into the batch macro is not unique. In this case the batch macro would execute multiple times for a give value. The easy fix for this is drop a SUMMARIZE tool prior to the batch macro in the MAIN WORKFLOW and group by the CONTROL PARAMETER.
I want my output file to be updated after every run because it goes as an input in next run. So i think i will need a combination of both batch and iterative macro to achieve this!
The control parameter will take care of the changing of dates dynamically in all formula and filter tools wherever required and iterative macro part shall take care of updating the output part after every run making it ready as an input for next run.