Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Check presence of specific columns before proceeding

ansonwun
8 - Asteroid

Hi, I have an analytics app that requires users to upload a file with specific column names. For example, if the incoming file does not have the column names "ID" and "Desc" present, the workflow should terminate with a specific error message.

 

I tried using the Error Message tool on the File Browse tool but can't seem to find a way to check for field names. I also tried the Test tool but the workflow will run regardless of the check, and the error message cannot be customized.

 

Any pointers will be appreciated. Thanks!

 

AW

2 REPLIES 2
Amol_Telore
11 - Bolide

I have tested this solution for two fields ID and DESC. If file do not contain any one or both the fields it will show an error message to user indicating "Insufficient data to proceed". You can customize this options as per your need. Let me know if this solves your issus.

Amol_Telore_0-1657201994636.png

Error Message :-

Amol_Telore_1-1657202159252.png

 

ansonwun
8 - Asteroid

Thanks @Amol_Telore 

I've since then arrived at a very similar solution indeed. In addition I've selected the "Cancel running workflow on error" in the workflow runtime configuration just to play safe.

 

Everything goes as expected. But if I have to be picky: when I run it on the server, it will show something like this:

ansonwun_0-1657206322119.png

Just wondering if it's possible to remove that (Tool Id: 277) string, as well as the last line "Workflow was Cancelled by Properties Setting"?

 

Thanks again.

AW