Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Data Quality using a list of business rule

Meena
8 - Asteroid

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

37 REPLIES 37
Meena
8 - Asteroid

Hi ,

 

I would like to test your solution which might work for me.

Please can you attach the macro too?

 

Thanks

BrandonB
Alteryx
Alteryx

@Meena it looks like @danilang has included the yxzp file at the bottom of their post which you should be able to open up in Alteryx. The Rule Validator macro is in the middle of the workflow.

Meena
8 - Asteroid

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

Meena
8 - Asteroid

Brandon.. I use Alteryx version 2018.4 which is unable to import Dan's package 😞

BrandonB
Alteryx
Alteryx

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. 

Meena
8 - Asteroid

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

Meena
8 - Asteroid
Thanks Brandon. I was able to download.

Regards
Meena | Data Architect, Partner Oversight, Small Merchant Acquistions
ponmeenal.balasubramanian1@aexp.com |18850 North 56th Street, Phoenix AZ 85054 | Phone : 602-537-5757

American Express made the following annotations

"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
American Express a ajouté le commentaire suivant
Ce courrier et toute pièce jointe qu'il contient sont réservés au seul destinataire indiqué et peuvent contenir des renseignements confidentiels et privilégiés. Si vous n'êtes pas le destinataire prévu, toute divulgation, duplication, utilisation ou distribution du courrier ou de toute pièce jointe est interdite. Si vous avez reçu cette communication par erreur, veuillez nous en aviser par courrier et détruire immédiatement le courrier et les pièces jointes. Merci.
danilang
19 - Altair
19 - Altair

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

 

i.png

 

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 

Meena
8 - Asteroid

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.

Meena
8 - Asteroid

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

Labels