This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi all. If this is in the wrong forum location please redirect me.
For my workflow we have several joins and unions from disparate Data sources. If a particular join does not result in any matching data, I know that someone selected the wrong files and I want Alteryx to stop and not proceed.
In other words, I do not want to get a final output that has missing data. What tool would I use to Stop Alteryx altogether and warn the user?
@Billbisco You may want to give the attached a try. I like to use the message tool. I've turned it into a simple macro so that it should be easy for you to copy it to your workflow with little problem. The attached yxzp has a sample workflow demonstrating the macro plus the macro itself.
The count records macro is included with Alteryx and will return a 0 if there are no records. I use a select tool to change the field name in case your data happens to have a field named count already in it. Then the message tool checks if count=0 and will throw an error and stop the data if it does find an error. In the case where there is no error, I union the count back to the original data and then get rid of the count field that I added. The unioning back to the original dataset and block until done are just safety measure to ensure no data is passed in the case of an error.