Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Finding a specific Year (in my case it is 2024) in input file and generate output

PARESH
7 - Meteor

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. 

8 REPLIES 8
gawa
16 - Nebula
16 - Nebula

@PARESH 

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.

image.png

PARESH
7 - Meteor

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

gawa
16 - Nebula
16 - Nebula

@PARESH 

I got it, then please go with this way. Key technique is almost same as previous one.

image.png

PARESH
7 - Meteor

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.

 

gawa
16 - Nebula
16 - Nebula

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. 

PARESH
7 - Meteor

I am attaching two input files for your reference, one should create output which is named as 2024 and the other one should not.  

PARESH
7 - Meteor

Sample Workflows

PARESH
7 - Meteor

Sample Workflows

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels