Free Trial

Alteryx Designer Desktop Discussions

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

How To: Standard Macro - Return Error Message Given Metadata Criteria

marcmalitz
5 - Atom

Hi all,

 

I am trying to design a macro (or 2, if easier) that would accomplish 2 items:

 

1) Read input data's format and run against a criteria (i.e.for Date, if the format isn't YYYY-MM-DD, return one error message stating "Date's format isn't correct."

2) Read input data's metadata and determine if it's acceptable according to criteria. If not, return another error message (i.e. specific field's metadata is a date when criteria specifies it must be numeric, so an error message is returned)

 

Basic process:

 

1. Input Node

2. Dropdown field asking 2 questions and which field from input node corresponds to each question

    i. Which field contains profit values?

    ii. Which field is the date field?

3. Macro would use the selected answers/fields and run against below criteria

    i. For profit values field, is the metadata numeric? If yes, message node stating "Profit values are in correct format". If no, error message stating "Profit values' data type is not correct."

    ii. For Date field, is the format YYYY-MM-DD? If yes, message node stating "Date values are in correct format". If no, error message stating "Date values are not in the correct format."

 

If possible, the error/correct messages would be consolidated into one message, but it's not a deal breaker. Thanks in advance for taking a look and please reply with any questions about aspects I may have missed! Attaching below table I'm using as test data.

 

Field1 (Date - MM-DD-YYYY format)Field2 (Profit Values)Field3 (Other)
12-22-2022A8W285858
2 REPLIES 2
gabrielvilella
14 - Magnetar

You can restrict the field type that is allowed on the dropdown, this way if the user does not see the field listed there it means that the type incorrect. Here is an example:

gabrielvilella_0-1667418446133.png

 

Felipe_Ribeir0
16 - Nebula

Hi @marcmalitz 

 

What do you think of this way of doing it? 

 

ReturnError1.gif

Labels
Top Solution Authors