Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Output Data in Same Excel Sheet according to Condition

harshal98
8 - Asteroid

Have One Input Coming - If it comes with the data it should update the final excel sheet as it is with the data coming.

If No rows come in the Input data it should update value 'No Records Found' in  all the column and update it in the same excel sheet.Input with Data/rowsInput with Data/rowsInput with no data/rowsInput with no data/rowsOutput with data/rowsOutput with data/rowsOutput with no data/rowsOutput with no data/rows

3 REPLIES 3
Yoshiro_Fujimori
15 - Aurora

Hi @harshal98 ,

 

I tried to add the row count to the original data to decide if "No Record" should be set or not.

But Append Field tool did not work for 0 record table. So I used Union tool instead.

 

There might be simpler solution...

 

Workflow

Yoshiro_Fujimori_0-1683179673284.png

 

 

harshal98
8 - Asteroid

Hi @Yoshiro_Fujimori ,

 

The Output to your solution is No Records Match but the output should have been the data as 2 rows are coming from the Input1, had there been no rows then it should have given the No Records Found Output.

 

Again - If data comes the output has to be the data as it is , If data / rows do not come then the output gives no records found.

So in actual case there will be only one input which either has data / rows or no data / rows. We have considered 2 inputs here as the solution should satisfy both the conditions.

Yoshiro_Fujimori
15 - Aurora

@harshal98 ,

 

I took the liberty of changing the Filter condition (to [RecordID] > 2), so that the T anchor should have no record.

Yoshiro_Fujimori_1-1683181489951.png

 

If you change the condition to [RecordID] > 0 , the output would be as below;

Yoshiro_Fujimori_0-1683181452519.png

 

So I think the above agrees with your statement below:

> Again - If data comes the output has to be the data as it is ,

> If data / rows do not come then the output gives no records found.

 

Labels
Top Solution Authors