Hello,
I need to add an error message to the workflow if the date format is different from "dd/mm/yyyy" (like the first row).
Is there a way to check for multiple columns?
Please let me know.
Thank you.
You can set up a separate branch from your main data stream, Transpose the data, check the date format, and join back to original data prior to Message Tool to check and throw the error. It is more difficult/impossible to detect "mm/dd/yyyy" as the incorrect format. My hope is that you do not need to evaluate this.
Here is a sample workflow:
Hope this helps and Happy Solving!
This is the way that I would do it.
Put this formula in a multifield tool selecting the date fields you want
IF REGEX_Match(tostring([_CurrentField_]), "^\d{2}/\d{2}/\d{4}$") THEN "Valid" ELSE "Invalid" ENDIF
Then add a transpose tool - Data Columns would be the new columns created from the multifield tool
Filter tool for Invalid
Add a test tool (Expression true for first record) and test value would be [Value]='Valid'
You will get an error message. You can stop the workflow based on receiving an error in the workflow configuration window - runtime
User | Count |
---|---|
52 | |
27 | |
25 | |
24 | |
21 |