Hello,
as I am creating an Analytic app that is going to be used by other people, I'd like to add a test that checks if the fields contained in the input file are named in the right way (the way Alteryx workflow expects).
the test would be something like: "blablabla" is not an existing field_name in input file (an Excel file)
I tried to do so both with the "error message" tool and the "test" tool but it seems they don't allow me to access fields names.
Any suggestions on how to do so in the simplest way? Like avoiding to transpose all columns to rows and check all rows with Contains(row,"blablabla")
thanks in advance
Solved! Go to Solution.
Hi @MassimoDM
Use the Field Info tool from the Developer palette. It outputs info on the fields as rows
Dan
thank you @danilang however I'm still fighting agaist it: I would like to output a specific error message to the final user in case the column doesn't exist.
I basically need an Error Message tool that can be attached to a normal input.
Hi @MassimoDM
Here are the changes to make to your workflow
Block Until Done ensures that the top branch runs to the end before the rest of workflow continues. After the Field Info, filter the fields you're looking for. Count the records from that match your criteria. Configure the message tool to error when the count is not correct.
Put this branch as early as you can in the workflow
You also need to configure the workflow to Stop on Error
Dan
Great! thanks again @danilang