ediScmValueList

The ediScmValueList contain a list of values and/or regular expression that is applicable to the data element that it is referenced by.  If the object contain a list of values, the data element can only accept those values in the list.  If it contains a regular expression, the value of the data element must match the pattern that is described in the regular expression.  Both a list of values and regular expressions can occur in the object.  The object is uniquely identified by its name.

NOTE:  If the data element satisfies the validation in the value list, the syntax verification on the data element value according to the EDI published standard is not involved.  That is, it only requires a match to one of the item in the list, or for the value to satisfy a regular expression, in order for the data element to be valid. 

List of Values

If ediScmValueList contains a list of values then the data element value is constrained to the list of values in order to be valid.  Values in the list practically have no character restrictions other than they must satisfy the length of the data element.  If the data element is not a numeric type then a case-sensitive string comparison is performed.  If the data element has a numeric data type, the values are compared numerically.  In a string comparison, the string value "04" is greater than the string value "004".  In a numeric comparison, the numeric value of both string values are compared.  In this case, the value "04" is equal to the value "004".  The inherent nature of data retrieved from the document is always a string, and if a numeric comparison is involved then a string to numeric conversion must takes place.  For a successful numeric conversion, the string must contain only numeric values (0 to 9), but it is possible that a string containing alphabetic character can be involved in the conversion.  If this is the case, starting from the left, a string is converted to a number character by character until a non-numeric character is encountered.  For example, the string "123.1B2" is converted to 123.1; the string "12B3" to 12; the string "B123" to zero; etc.  Note how the alphabet "B" stops the conversion.

An example of a list of values could be as follows:

Regular Expression

If ediScmValueList contains regular expressions then the data element value must follow the pattern defined in the regular expression in order to be valid.  If there are more than one regular expressions listed then it is enough to satisfy only one in the list.  The regular expression syntax currently recognizes that defined by the Standard Exchange Format (SEF) standard, which is as follows:

Other examples that define character and is recognized by FREDI are:

An example regular expression could be as follows:

For example, the string "ITEM23C" follows the regular expression specified above.  The circumflex (^) indicates that no character can precede "ITEM" which means the string can only begin with that substring.  It is followed by two numeric characters defined by "[0-9][0-9]", and then followed by an alphabetic character defined by "[A-Z]".

 

Properties