Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Enable/Disable Tools execution based on Filter condition

Antony89anto
7 - Meteor

Hi Friends

 

I need to write Alteryx Results in to DB Tables. Before writing, I need to check is there any data available in Staging table. If available write data into Archive Table and then write data to Staging. To handle this, I follow below steps. 

 

  • Reading count of records from Staging Table (1 - data exists/0-no data).
  • Appending this value with actual data (simply)
  • Checking in Filter about data count.
  • Filter tool : If data exists, then in output File, I have Pre SQL statements to perform below and then write data into Staging table
    • Insert into Archive table from Staging Table
    • Truncate Archive Table
  • If there is no data in staging, then data will be directly inserted into Staging table

However, when I execute Query, both output files are executed, instead of one output flow.

 

I thought, enabling/disabling containers will sort out issue. But, I dont know how to pass filter values to Containers. Please suggest me best practice to implement this. 

 

FlowFlow

 

In the below flow Output Data (105) Should not be executed as Filter conditions fails there. 

 

Antony89a_2-1584619226327.png

 

 

Thanks

Antony 

6 REPLIES 6
RolandSchubert
16 - Nebula
16 - Nebula

Hi @Antony89anto ,

 

the Filter tool evaluates the condition, but unfortunately both results are executed. A possible solution could be to create a macro for the "write to file" part and use the Detour tool to decide, which part should be executed. I've attached a sample workflow writing to either F1.csv or F2.csv depending on the number of rows in an input table. What do you think?

 

Best,

 

Roland

Antony89anto
7 - Meteor

Hi Roland

 

Thanks for your Support. I am not able to open this file. I am using version 2019.4.8 and seems like you r using higher versions. Is there anyway around? 

 

Antony89a_0-1584632835794.png

 

 

Thanks

Antony

RolandSchubert
16 - Nebula
16 - Nebula

I've modified the version within the files, you should be able to open now.

AbhilashR
15 - Aurora
15 - Aurora

@Antony89anto 

 

Right click the file and open it in notpad. In there you will see a line which looks something like this:

<AlteryxDocument yxmdVer="2020.1">. Change the number in blue to 2019.4.

Antony89anto
7 - Meteor

Thank you Roland! 

 

One more question. Can't we do this with Containers? 

 

Thanks

Antony

Antony89anto
7 - Meteor

Thank You Abilash! 

 

Thanks

Antony

Labels