Need certain num format to flag field

Hope someone can help:

I have this code for PartNumber field which is supposed to flag another field. I keep getting the error:

Incorrect datatype for operator or @Function:Number Expected.

@SetDocField(@DocumentUniqueID;“rohsflag”;

@Matches(PartNumber;“{0-9|A-z}{0-9|A-z}{0-9|A-z}{0-9|A-z}-{0-9|A-z}{0-9|A-z}{0-9|A-z}{0-9|A-z}-R{0-9|A-z}{0-9|A-z}”));

@UpperCase(PartNumber)

Can someone tell me what is wrong?

I appreciate any help…

Subject: Need certain num format to flag field

First off, there’s no reason to use @SetDocField, since it appears you’re setting a field on the current document. Second, is PartNumber a numeric field? @Matches works with strings, not numbers.

Subject: RE: Need certain num format to flag field

Esther;the PartNumber field is text/editable. Can you give me an idea of what could cause the error?