HI,
I need your support in finding a specific Year (in my case it is 2024), If it is available in one of the field ("Year") input file then only I want to generate output otherwise no output needed and also no changes required in the input file format.
Appreciate if you could please assist here.
Thanks.
You can filter data by Filter tool with Contains() function.
If you don't want to output data, this is how I usually do. If there is no match record, Container inside Batch macro will be turned off, and no output data is created. Of course if there exist record/s, Container is enabled and it outputs data.
Thanks @gawa for quick response, Sorry I couldn't explain my ask clearly.
My requirement here is if I have below data (First Table and Second Table) then I need all the row items from first table since it has 2024 in the input file but I do not want any output from the second table as input file rows not have 2024 inside the file (in Year column).
First Table (Input File)
Year
2022
2023
2024
Second Table (Input File)
Year
2021
2022
2023
It is still generating output when 2024 does not exist in input data. I only want to generate output when 2024 is there in the input data.
It does NOT create any output file when condition is met. Maybe you mean output is not a file create? Then you can modify my WF to meet your demand. For example append flag field to all record by Appendix Field tool and pass it to Filter tool.