Article: Using Masks

Index

Using Masks

Masks enable you to change the usage of a segment’s elements from their default values

Example

Sometimes the same segment is used in more than one position. It’s element usages may differ in each place. For example suppose you have a segment named SEG with 2 elements (101,102) that have REQUIRED and OPTIONAL as their default usage.

Default usage of the SEG segment’s elements

SEG
Default Usage
101
REQUIRED
102
OPTIONAL

In one position this is the correct usage of the segment but in another position only element 101 is REQUIRED and 102 in NOT USED.

SEG
New Usage
101
REQUIRED
101
NOT USED

This is where masks come in. Masks enable you to change the usages of a segment’s elements depending on what position the segment appears in. A segment can have more than one mask.

Example

SEG
Default Usage
Mask1
101
REQUIRED
REQUIRED
102
OPTIONAL
NOT USED

Step 1 – Adding a Mask To A Segment

  • Click on the TEMPLATE SEGMENTS tab on the EDI Rules Creator Studio. Double click on the template segment you want to add a mask to graphic

  • When the Template Segment screen appears click on the ADD MASK Button. This will cause a new column named Mask1 to be added to the table graphic

  • Enter the new usages for the elements in the Mask1 column as shown above and click on the UPDATE button to save

AMT segment’s elements have a default usage of OPTIONAL, OPTIONAL and OPTIONAL for it’s 3 elements. Now it also has a mask with element usages of REQUIRED, NOTUSED and OPTIONAL. This means that this segment can be used in two different positions with different element usages

Step 2 – Using Masks

At this point we have segment AMT that contains a mask. Instead of using the default element usages we want to use the mask created in Step 1.

  • Double click on the AMT segment graphic

  • The Segment screen will appear. You will now see all the details of the AMT segment as well as a new column named Mask1.

  • To use Mask1 just select 1 from the Mask combo box
  • Click on the UPDATE button to update the segment

Mask2 has now been applied to AMT at this position.

 

 

Related Articles

Main Categories