Hi
I a working on a requirement where I have validation rules built for a set of columns.
Instead of writing formula on each field I want to keep it dynamic so that when the rules changes there will less code change.
The field Names should be read from "Validation Rules" sheet and appropriate validation rule checked against the data to produce the output result.
I have attached a sample of how the rules will look like and what the output is expected to be "<Field Name> Quality".
Please can you share ideas on how this can be done?
Thanks
Solved! Go to Solution.
Hi ,
I would like to test your solution which might work for me.
Please can you attach the macro too?
Thanks
Dan... Apologies... I use an Alteryx version 2018.4 hence unable to download your package.
Please could you guide me how I get your solution to test it out?
Thanks
Brandon.. I use Alteryx version 2018.4 which is unable to import Dan's package 😞
I edited the Alteryx version in these files. Can you give it a try now? You will need to download both files first. Then you will notice in the BusinessRuleChecker file that there is a box with a question mark when you open it up. You will need to put the RuleValidator macro in this spot and reconnect the connections.
Hi Dan,
When I add new rules and change the input I get an error saying "The field schema for the output "Output13" changed between iterations. I guess this is from the macro.
This is first time I am using Alteryx macros would you be able to spare some time in explaining what each step in your macro is destined for?
Thanks
Hi @Meena
You're correct in that the error message is caused by the macro. Specifically, the fields in the output have changed between one iteration and the next. You can change this behaviour by opening the macro and selecting View->Interface Designer from the menu. Click on the Gear icon on the left and check "Output fields change based on macros'..." and select "Auto Configure by Name..." as shown below
Save the macro, and run the main workflow. The macro should run to the end now.
However, this error is caused by a difference in structure between the sample data you provided originally and the data that you're running with. Allowing the macro to proceed may not give you the correct results. Validate the results and if they don't agree with what you're expecting, can you attach the Validation rules.xlsx that causing the error?
@BrandonB Thanks for all your help
Dan
Dan... Your solution is awesome and simple.
As I'm new to using macros and control parameters I'm understanding your solution and customizing to suit my requirement.
The volume of my date & # of business rules is huge.
Hence I will have to test it to see on the time consumed if we do field by field (transpose of data) validation.
Meanwhile if you think of anything which we can do without transpose kindly let me know.
Thanks a lot.
Brandon,
Are you with Alteryx?
Would you be able to guide me on Dan's solution and help me understand the macro in depth?
I'm replicating Dan's solution and trying to customize it, but unsuccessful so far..
Have never designed any macros until now and keep getting errors on the action tool 'root elements missing' etc.
We can connect via webex if you would be able to help me out.
Thanks