Column Value validation

Dear Knimers,

Please need your help to get a workflow or node to Validate the US Postal code from CSV file

For Example: If any of the the values are less than 5 digit then that row needs to be flagged as In valid.

Thanks & Regards,

Pragadesh P

This kind of rule can be implemented using the Column Expressions node.

For your example, the expression would be

if (length(column("Postal Code"))<5)
{"invalid"}
else
{"valid"}

image

1 Like

Thank you @elsamuel !

It worked

If I want to find a Null values in the CSV file, I have used Null or “” it not worked

if (length(column(“Postal Code”))<Null or “”)
{“invalid”}
else
{“valid”}

You’re welcome.

If you want to find null values, then you’ll need to use the isMissing function, not the length function.

For example:

if(isMissing(column("Postal Code"))==true)
{"invalid"}
else
{"valid"}
1 Like

Thank you @elsamuel it worked

Please share me if I need to verify the set of values

@elsamuel

If the Values in (“A”, “B”, “C”) then Valid else Invalid

Plz share me the node and workflow

If the Values in (“A”, “B”, “C”) then Valid else Invalid

Plz share me the node and workflow

I don’t really understand what you’re asking for here. Can you provide more detail about what you’re trying to accomplish and what you’ve tried?

Rule Engine provides you a check for “IN”
you can use that
br

Thank You @Daniel_Weikert