Record Validation

I am trying to build a record to validate a record in the pipeline against. The record in the pipeline is already built with the correct fixed length strings. I want validation to fail when a field is empty. For example the field is a length of 8 but there is no data. It contains 8 spaces. How do I set the constraints for this field in the record to check for an empty string? Thanks for your help.

Rebecca,

If you working on IS6.x version there is a WmFlatFile package service (pub.flatFile:FormatService).So create a custom validation service using this FormatService as a SpecificationReference in the Input/Output tab.So using this record you have a flexibility to validation according to your requirement and finally specify this custom service in your FlatFileSchema (fixedlength)of the FlatFileStructure/Properties section locate that particular field and there is a formatService tab(browse the custom service here),so when you do convertToValues this validation will takes place.So this acts like a record/Field constraint.

But,If you are not using any flatfile schemas etc…,then create a custom service and do Branch on that particular validation Field and if you want to check for spaces then on the sequence label use the regular expression that will check if there is any spaces in the data (/ +/).
Since you know that this Field is populating with Correct fixed length,then just check the data if it comes with spaces.

Branch (Switch=validationField)
—>Sequence (label = / +/)—This expression will check if any spaces
------>Flow steps (Nofity some error message and validation fail)Exit the flow
—>Sequence (label=$default)
-------->Continue the process

HTH,
RMG.

RMG
I am using IS 6.0.1. I had similiar problem. I followed your option of format service.

1.create a custom service which nullify empty values
2.included this in the ff schema

run convertToValues, checked the FFValues. The field is mark as “null”
But validation error is not thrown for null values

please advice what I am missing
UMG

Hi RMG,
Can you share the format service mentioned above for trimming data.
Thanks,
Shubhro

RMG,
I managed to write the format service I wanted by using the specification pub.flatFile:FormatService.
Also I could generate errors by setting the “meetsFormat” to “false” if the trimmed value is blank in my custom format service. That takes care of the problem UMG was having.
Thanks,
Shubhro