Create Custom Masked Tagged Value Type

If you are creating a custom predefined Tagged Value type, you can achieve great flexibility in designing model components to accept data entries, by defining a mask that formats the data into a template.

Access    Settings | UML Types > Tagged Value Types

Create a masked Tagged Value Type

Field

Action

See also

Tag Name

Type an appropriate name for the masked Tagged Value Type.

 

 

Description

Optionally, type a description or the purpose of the Tagged Value Type.

 

 

Detail

Type or copy-and-paste the Tagged Value structure:

Type=Custom;
Mask=<mask values> ;
Template=<template text>;

The mask values are explained in the next table, with an example to demonstrate how to use the template.

The template text defines information to be displayed in every use of this custom Tagged Value, such as field names and prompts for data.

 

 

Save

Click on this button to save the new masked Tagged Value type.

The Tagged Value type displays in the Defined Tag Types list.

 

 

New

Optionally, click on this button to clear the fields so that you can enter information for another new Tagged Value type.

 

 

Mask Values

When defining the format of the mask in a masked Tagged Value type, use these characters:

Mask

Action

D

Display a digit only in this character space.

 

d

Display a digit or space only in this character space.

 

+

Display +, - or a space in this character space.

 

C

Display a letter of the alphabet only in this character space.

 

c

Display a letter of the alphabet or a space only in this character space.

 

A

Display any alphanumeric character in this character space.

 

a

Display any alphanumeric character or a space in this character space.

 

.   or <space>

 

Leave a character space, to be filled by text from the Template parameter. Using dots might make it easier to see how many spaces you have set.

Example

CustomTaggedValues

 

In the diagram, the Mask parameter first defines seven blank spaces, which are occupied by characters defined by the Template parameter.

The first two visible characters in the Mask are each represented by a lower case c, indicating that the user can enter information as either an alphabetic character or a space.

The next six blank spaces again indicate characters defined by the Template, followed by five characters each represented by a d, which indicates that the user can input data in the form of digits or spaces. The dot marks a space to be filled by a hyphen from the  Template, followed by four more ds (digits or spaces).

The Template syntax defines the template for the Mask parameter, filling in the blank spaces in the Mask. The text is the information to be printed with every use of this Tagged Value; the underscored values indicate the character spaces that are to be occupied by data input by the user, as defined in the Mask option.