Refining Traps

A Trap has four possible property components:

  • Value

  • Font

  • Alignment

  • Cell Properties

You can review the trap components by selecting the edit icon beside a trap:

 

Initially, the Value tab is displayed:

 

At this point you can:

  • Refine cell value rules

  • Add a new value rule.

  • Select the Font, Align, or Cell tabs to edit Font, Alignment, or Cell Format trapping rules.

Trap Components

Value

The Value tab allows you to define traps according to the values in a cell. Value Rules are the following:

Rule

Description

Formatted Value Equals

Value of the formatted cell must be equal to the value that you set.

When you select this rule a text box will ask you to set the Equal To value.

Starts With

Value of the cell must start with the value that you set.

When you select this rule a text box will ask you to set the Starts With value.

Ends With

Value of the cell must end with the value that you set.

When you select this rule a text box will ask you to set the Ends With value.

Contains

Value of the cell must contain a string of alphanumeric characters that you set.

When you select this rule a text box will ask you to set the Contains value.

Is Blank

The cell must be blank.

Is Non-Blank

The cell must not be blank.

Is Number

The value of the cell must be numeric.

Is Currency

The value of the cell must be numeric and formatted as a currency.

Is Date

The  value of the cell must be a date .

Is Propercase

The value of the cell must be a string, and for each word, the first character must be in uppercase while the rest of the characters must be in lower case.

Example: All Word In This Sentence Are In Propercase

Is Uppercase

The value of the cell must be a string, and all characters are in uppercase.

Example: ALL WORDS IN THIS SENTENCE ARE IN UPPERCASE

Is Lowercase

The value of the cell must be a string, and all characters in lowercase.

Example: all words in this sentence are in  lowercase

Is Mixedcase

The value of the cell must be a string, and all character are written are lowercase and uppercase

Example: MosT woRDs IN THiS sentence ARe in Mixed CAsE

Is Merged

The value of the cell must be within a merged cell.

Monarch Expression

Enter a valid Monarch trap expression.

 

As in standard Monarch trapping, you can use the following trap characters:

trap alphanumeric characters

trap numeric characters

trap blanks

trap non-blanks

 

The expression can be a mix of alphanumeric characters. You can use * as a wildcard by selecting Use * as wildcard.

Examples

 For example, you can use different expressions to trap lines in a worksheet like this:

 

Example 1

You can define the following expression:

 

to define a literal trap that traps only lines with Item codes that start with FR. Applied to sample data above, the result will be:

 

Example 2

Define the following expression:

 

to trap only lines with Item codes that start with two alphanumeric characters followed by a dash and then four numeric characters. Applied to sample data above, the result will be:

 

Example 3

Define the following expression:

 

to trap only lines with Item codes that start with two alphanumeric characters followed bya dash then any sequence of wildcard characters containing the number 8. Applied to sample data above, the result will be:

 

Regex

Enter a valid Regex Trap expression. Follow the rules described here.

 

Notes:

  • The drop-down allows you to select valid Value rules:

  •  

  • Some rules will require you to enter a specific value. For example, Starts With, will display a text box:

  •  

  • You can define more than one value rule, for example:

  •  

    In case of multiple value rules, the rules are combine using the AND logical operation.

  • If you define contradicting value rules, for example:

  •  

    no values will be extracted.

  • Select the delete icon (red x) beside a value to delete it.

  • Together with the value rules, you can also check the following:

    • Case Sensitive to ensure that text values are strictly applied with respect to letter case. For example if your value is Starts With "NORTH" and Case Sensitive is checked, values that start with "north" will be ignored.

    • Negate to follow the opposite rule instead

Font

The Font tab allows you to define traps according to Font properties.

 

Notes:

  • Font properties include:

    • Font Name

    • Font Size

    • Font Color

    • Font face: bold, italicized, underlined

  • For Font color, set  the RGB values in the boxes provided. Use the eyedropper tool: select the tool (dropper color will change from white to black) and then click on the cell you want to pick the color from.

  • You can select or unselect all the font rules as needed.

  • Select Negate follow the opposite of the rule instead

Align

The Align tab allows you to define trap according to alignment properties.

 

Notes:

  • You can select or unselect all the alignment rules as needed.

  • Select Negate follow the opposite of the rule instead

Cell

The Cell tab allows you to define a trap according to cell decoration properties.

 

Notes:

  • Cell decorations include:

    • Background

    • Left Border

    • Right Border

    • Top Border

    • Bottom Border

  • You can set the background and border colors in two ways:

    • For color-related values, set  the RGB values in the boxes provided. Use the eyedropper tool by selecting the tool (dropper color will change from white to black) and then clicking on the cell you want to pick the color from.

    • You can select or unselect all the cell decoration properties as needed. For some properties you will need to set specific values.

  • Select Negate follow the opposite of the rule instead

 

 

 

 

© 2024 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support