Alteryx Designer Desktop Discussions

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

HELP. Quick Turn. How do I ignore segment of workflow if no records are present.

hellyars
13 - Pulsar

HELP.

 

See image below.  Note error marker on formula.   This is part of an macro/app.   I found 1 of 35 documents does not contain quantities so no records are passed -- which creates the error. 

 

How do I get the workflow to bypass this string if there are no records going to it?????

 

I tried add a count tool and then a filter set to count does not equal 0.   But that does not work.

 

 

hellyars_0-1650636954084.png

 

 

 

 

6 REPLIES 6
hellyars
13 - Pulsar

One more thing.... reference image of workflow....

 

The first filter after the parse is do not pass if Quantity is null... it passes no records to the rest of the snipped  ...and then hits my count / zero filter ....yet it still hits the formula with no records and errors causing my app to fail.

hellyars
13 - Pulsar

This is a bit mental...

 

...I came up with a band-aid...

 

After count + filter ....


True passes no records...(meaning no records)...passes no records to the formula tool and creates an error.

So, I took the false record (count = 0) added an ensure fields (to sum in formula tool) that passes dummy data (filled with zeros) to the formula tool to avoid error message

Ugh...there has to be a simpler way to do this...

 

 

hellyars_0-1650637383863.png

 

 

 

soccertil1108
8 - Asteroid

without getting into detailed solution to your problem. How about this quick idea? You can create a marco that has two branchs for the input stream and then a Union at the end. Put the two branches in separate Tool Containers. Pass a count of records into the macro as a parameter. If the count is Zero disable the first container, if not disable the second container. reach out of you have additional questions or can provide detailed data and workflow.

soccertil1108_0-1650641245157.png

 

soccertil1108
8 - Asteroid

sorry for the quick response change. I did an additional test and the workflow still runs if you only have the first container and no union. with the container turned on it returns the data stream; with the container turned off it returns an empty data stream.

 

soccertil1108_0-1650641471028.png

 

soccertil1108
8 - Asteroid

I haven't seen a response from you so I took some time and created a macro that skips a formula if there are no records. Check out the attached workflow and macro.

soccertil1108_0-1650645353822.png

 

hellyars
13 - Pulsar

@soccertil1108  Thanks.  Just came up for air.  Will take a look.

Labels