Costcode Breakdown & Standard Costcode Description Masking

Issue/Symptom/Question

How does the Costcode Mask field in the Standard CC Descriptions window and the Edit Style and Edit Mask/Validation Rule fields in the Breakdown window work?

Applies To

PENTA For Windows

Project Management>Setup>Costcodes>Costcode Breakdowns

Project Management>Setup>Costcodes>Standard Costcode Descriptions

System Management>Technical Support>Options

Resolution/Fix/Answer

The Costcode Mask field within the Standard Costcode Descriptions window allows for the user to enter a wildcard mask like '%' or '_' in this field to indicate that the values entered can be any number or alphanumeric character when entering it in a Costcode field within PENTA. The default for the Costcode field is numeric.

Use of Wildcard %:

System Option #5 indicates whether to match the entry to the rightmost segments of the costcode (Mask %411) or leftmost segments (Mask 411%) - the default is to match the Costcode Description based on an entry of the rightmost segments

For example when using the '%' wildcard in the Costcode Mask field within the Standard Costcode Descriptions window:

  • %100 - Mobilization
  • %200 - Demolition

If the user entered a Costcode of 10100, PENTA would default the Costcode Description to be 'Mobilization' as long as the last 3 characters were 100 - assuming the Costcode Breakdown allowed for up to a 5-digit costcode 

If the user entered a Costcode of 9999200, PENTA would default the Costcode Description to be 'Demolition' as long as the last 3 characters were 200 - assuming the Costcode Breakdown allowed for up to a 7-digit costcode

This wildcard of % indicates that PENTA does not care about what is entered before the last 3 characters to find a Costcode Description; as long as the Costcode length falls within the sum of the Costcode Segments within the Job's Costcode Breakdown 

Use of Wildcard underscore:

The '_' underscore works similar to the % in that it does not care what value is entered but different in that a single underscore is only one character. To get the same results as using the % wildcard from the example above you would need to set it up as follows:

  • __100 - Mobilization
  • ___200 - Demolition

If the user entered a Costcode of 10100, PENTA would default the Costcode Description to be 'Mobilization' as long as the last 3 characters were 100 and they only entered 2 digits in front of 100

If the user entered a Costcode of 9999200, PENTA would default the Costcode Description to be 'Demolition' as long as the last 3 characters were 200 and they only entered 4 digits in front of 200

Edit Style and Edit Mask/Validation Rule within the Costcode Breakdown window

Edit Style. This value defaults from the standard segment definition, but can be conditionally overridden. Entry is required from a drop down list of four possible values:

  • List of Values.  For this edit style, when costcodes are established a check will be made against a user-defined list of possible values for a given segment to ensure that the value represented in that segment is valid.
  • Edit Mask.  An edit mask consists of a string of characters, either "9" for numeric, "A" for strictly alphabetic (A-Z) or "X" for alphanumeric, that represents the format for the segment.  It must be the same length as is defined for the segment.  For example, if a 4 character segment should require a format of 2 alphanumeric characters followed by 2 numeric digits, the mask would be "XX99".
  • Validation Rule.  A validation rule is actually an extension of an edit mask, providing greater flexibility in the definition of the segment format.  Each character can be given a list of specific values that it must match.  For example, if a segment is four characters and the first character must be either A, B or C, the second between G and Q, the third a number between 0 and 3, and the fourth a number between 0 and 9, the rule would be defined as: [ABC][G-Q][0-3][0-9]. As with the mask, the validation rule must match the length of the costcode segment.  
  • None.  If an edit style of "None" is used, no editing will be done on that particular segment of the costcode.

Edit Mask/Validation Rule. If the edit style entered is either "Edit Mask" or "Validation Rule", the actual mask or rule is entered in this field. The mask or rule can then be checked for proper syntax with the "Test  Mask/Rule" command  button.  Please see "Edit Style" above for a further discussion of the edit masks and validation rules.