Jump to content

Skip a record that has Social Security in a Address Line


rpaterick

Recommended Posts

Assuming there's a question in there somewhere, I would create an OnRecordStart rule:

if ((Field("Add1").search(/\d{9}/) > -1) ||  (Field("Add2").search(/\d{9}/) > -1)) {
  FusionPro.Composition.composeThisRecord = false;
  ReportWarning("Record #" + CurrentRecordNumber() + " was skipped because it may have a SS# in address field.");
  }

Link to comment
Share on other sites

Assuming there's a question in there somewhere, I would create an OnRecordStart rule:

 

esmith, this didn't work for me. I thought I had something going and when I went to test a few scenarios, my FP doc error'd on me and wasn't kicking out the "9 digit" numbers.

 

I've attached the file to this post. Looked like it was going to work and maybe I didn't have something quite right. I want to try and skip the last 2 records in this test file or records 3 and 4 when I compose all. Will the code only look for 9-digit NUMBERS(any combination) in a row and not just 9-digits overall in the field?

 

Thanks!

test.pdf

22673_Final.txt

Link to comment
Share on other sites

Today I learned that you can not use a regular expression in an indexOf method. However, the search method is the equivalent method which does use regular expressions.

 

If you replace the two instances of .indexOf with .search, the code should work as expected. :)

 

Will the code only look for 9-digit NUMBERS(any combination) in a row and not just 9-digits overall in the field?

The code ignores any record with a string of 9 digits (in a row) in either of two fields.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...