Alteryx Designer Desktop Discussions

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

Error message on selecting wrong input file

Neelima1
7 - Meteor

Hello,

 

Can anyone guide to develop a workflow pop up an error message if user selecting wrong file and column headers are different in the input file.

8 REPLIES 8
rzdodson
12 - Quasar

@Neelima1 here is one approach you can take.

 

Basically what I am doing here is using a Filter tool to test whether a specific condition is occurring in the data set. If that condition is met, it'll trigger a Message tool that errors out the workflow. If the condition is not met, then I union the data back together and continue on with the workflow. You can adjust the Filter tool to whatever set of conditions that needs to be tested.

 

Solution.png

Neelima1
7 - Meteor

Hi

 

Thank you for the workflow. Error message should pop up when the file name is different. Ex:  File Name :ABC_WK_22.03.24 should be the actual input file, user select XYZ_WK_22.03.24.

rzdodson
12 - Quasar

@Neelima1 slight change on the above. Included the file name you wanted (ABC_WK_22.03.24 and the file name that was selected as variables within the error message.

 

 

Neelima1
7 - Meteor

Thank you for quick response :)

 

I am trying to use Wildcard in file name, since date will change on every run. Is this correct format?

 

[FileName]="Kronos_Accruals_WK_*"

rzdodson
12 - Quasar

@Neelima1 it is not, but I would recommend a simpler way of handling it. I have updated the workflow (attached here). I inserted a Formula tool that creates a FileNameTest field that will dynamically update based on when the workflow runs. Let me know if that is what you are looking for.

 

Solution.png

Neelima1
7 - Meteor

Hi 

 

File will be downloaded from upstream application and saved with date on the day it is downloaded,  no need to redefine the date. User will select the file as is. I want to use wildcard after _ in the file name, so that user can select the file they want to run

"Kronos_Accruals_WK_ "

 

HomesickSurfer
12 - Quasar

Hi @Neelima1 

 

Perhaps you can benefit from an Analytical App instead, giving you ability to specify arbitrary file specifications in the File Browse tool.

Neelima1
7 - Meteor

I have used error message tool to pop up an error message when wrong file picked up. Below is the formula need to be updated in error message tool expression. "XYZ_weekly_File" is the file name validating with the input file uploaded into Alteryx

 

!IsEmpty([#1])&&Contains([#1],"XYZ_weekly_File")!=-1

Labels