Custom attributes

Editing (adding, modifying, deleting) custom attributes has a large impact on your database. It modifies all related items, rebuilds the search index and public views, and replaces the client cache.

Back up your database before editing custom attributes.

Before you begin editing custom attributes:

• Ensure that other users will not be using the system.

• Close all parts, documents and change forms in your workspace.

Deleting a custom attribute removes it from all related items. You can undo this removal only by restoring the database backup.

After you delete a collection member's custom attributes and before adding new custom attributes, save your edits and then restart your PDXpert client application.

After you finish editing custom attributes, restart your PDXpert client application.

Items affected by your edits must be re-indexed, which may affect search results until indexing is finished.


Custom attributes are useful for specifying unique data about your product design. You can define an unlimited number of custom attributes for any item type, and those attributes are then attached to instances of that item.

A custom attribute is always associated with an item, not a specific iteration. It can be modified by the current item trustee, any analyst, and any Product Team member regardless of the current iteration's release state.

The document, part and change form windows let users provide a value for any custom attributes that you have defined in the collection's member.

An item's custom attribute values can be merged with its naming template (as defined on the Part Type or Document Type) to automatically create the item's name.

Where used

Documents, parts, change forms

Data fields

This determines the order in which the custom attribute is displayed on the item (left to right, from top to bottom). Duplicate or missing values are permitted, but will not affect the standard layout.
The scheme determines the data type of the custom attribute value, as well as whether there's a unit of measure displayed. There are 3 principal schemes: UOM, data type and collection.
When a custom attribute's scheme is selected, it can never be changed.

The UOM scheme is used for numeric values with units of measure. For example, a specific part type (such as Machine Screw) defines a custom attribute (for example, Length) with a unit of measure (say, cm). As users create specific Machine Screw parts, they can supply the actual Length numeric value and unit of measure.

The Data: schemes specify a value with a particular format and data-entry method. On the item window:

  • Data:Boolean becomes a checkbox.
  • Data:Date provides a calendar dropdown control.

    The value appears the same to all users, regardless of their computer's timezone. The value is not stored as UTC and converted to local time.

  • Data:Float allows a numeric value with fractional component.
  • Data:Integer permits whole numbers only.
  • Data:Money is similar to a Float, but also displays a member of the Currencies collection.
  • Data:String is normal text (alphabetic, numeric, punctuation and symbol characters).
  • Data:URI is a universal resource identifier, prefixed with ftp://, http://, file:// or similar, and has an Open button.

The Collection schemes specify that users can choose a member of the selected collection. For example, selecting the Languages scheme allows users to assign the value of English, French or other active member of the Languages collection.

A custom collection is prefixed with Custom: (for instance Custom: Colors).

This is the name of the custom attribute, which is displayed as the control's label on the item.
The strings _#_, _##_ and _###_ are reserved and cannot be used for custom attribute names. Avoid using HK as the first two letters in your name to prevent conflicts with system "housekeeping" columns (HK1, HK2, ...).
See the Setup suggestions, below, for important information about naming your custom attributes.
Description or purpose
This describes the custom attribute's purpose. On the item, it's displayed as a floating hint to the user.
It's often useful to indicate what range of values, or subset of collection members, might be expected. For example, instead of using Enter the maximum power it might be more helpful to say Enter the maximum power (1W to 50kW).
Default value
Although a default value is not required, you can suggest one to the user. If you do not specify a default value, then a numeric value is 0 and a Boolean value is false; other scheme default values can remain empty.
Modifying the Default value on an existing custom attribute does not change the assigned value on existing items.
Default unit of measure
Units of measure are associated with the UOM and Data:Money schemes. A unit of measure can also be a currency, such as USD or JPY. If you do not select a unit of measure in the item type (for example, your data is text), then the item record's custom attribute unit of measure is also blank.
Modifying the Default unit of measure on a previously-created custom attribute is possible but not recommended. Existing items already using that custom attribute are not updated to the new value.

Setup suggestions

Custom attribute definitions follow these rules:

  • When a new custom attribute definition is added to an item type, all existing items of that type are updated to include the new custom attribute. The default value, if any, of the new custom attribute is applied to each item.
  • If a custom attribute definition is deleted from the item type collection member, all items of that type lose that custom attribute.
  • An item's custom attribute is added or deleted regardless of its release status. Users will see these additions or deletions the next time an item of that type is opened.

Consider limiting the length of the custom attribute Name to less than 30 characters.

Creating a custom attribute

Before making any changes to custom attributes:
1. All users other than the administrator should exit the PDXpert application.
2. The administrator should close all open data records (Item | Close All).

Changes to custom attributes can affect the local views database. Before you add, remove or rename custom attributes, all users should exit ODBC applications that use local views. After making your changes, users should start the PDXpert client before resuming work with the ODBC application.

To create a custom attribute on a Document Types, Part Types, or Change Forms collection member:

  1. In the Collection Explorer, open the collection member that will have the custom attribute.
  2. Unlock the collection member window (keyboard F2).
  3. On the Custom tab, select Data:String as the scheme, and name the new custom attribute.
  4. Save the custom attribute by locking the window (F2).

Design guidelines

Also refer to the help topics under How to report, import & export > View & export via ODBC for related information.

Each custom attribute requires two database columns: one is for a data value (string, number, date, etc.), the other for a collection member selection.

Naming custom attributes

Custom attribute names appear as column headers in public views and user-defined views. If you intend to access custom attributes via ODBC or within data transformations, then you should take into account how the Microsoft SQL Server and SQLite databases will work with your custom attribute's name.

Many types can share the same custom attribute Name.  In this case, the item types' custom attribute values, regardless of scheme differences, are merged into a single value/member pair of database columns.

Almost any character (including the space character) may be used in the custom attribute name. However, limiting your character set makes SQL queries easier to write, improves compatibility with members of the Data Transformations and Views collections, and simplifies data exchange with other software systems.

Attribute name summary

The safest custom attribute name (a) doesn't conflict with an standard PDXpert data column name, (b) begins with a letter, (c) contains only ANSI alphanumeric and underscore characters, (d) is short, and (e) is not a Microsoft SQL Server or SQLite reserved key word.

  • Begin an attribute Name with a letter character. Avoid special special symbols, punctuation, and doubled space characters.

  • Use short Name values, preferably fewer than 40 characters. Long labels are difficult to use when designing custom SQL queries and reports, and when defining text templates to merge custom values. Use the Description or purpose text for longer explanations or instructions.

  • Avoid phrasing attribute names as questions. You'll avoid the leading word as well as question mark Have you confirmed cost? becomes Cost confirmed.

  • Use checkboxes (scheme is Data:Boolean) for simple fact assertions. Use a custom collection to limit users' choices to fixed set of responses like Yes / No / Not applicable.

  • Avoid using unnecessary uppercase letters, which consume space and may be more difficult to read; for example, Auditing organization is better than AUDITING ORGANIZATION.

  • PDXpert uses the Sort numbers to automatically lay out attributes from left to right, and top to bottom. On the item's Custom list, the right-hand columns are wider than the left. So, assign the odd Sort numbers (1,3,5,...) for short labels and short data, and even Sort numbers (2,4,6,...) for longer labels and text responses.

SQL Server constraints

SQL Server column names must be a regular identifier that:

  • begins only with letter characters defined by Unicode Standard 3.2 (which includes A-Z and a-z), @ and #
  • limits subsequent characters to Unicode letters, 0-9, _, $, @ and #
  • is not a Transact-SQL reserved word:

Refer to this Microsoft SQL Server help topic for naming guidance:

SQLite constraints

SQLite column names must:

  • begin with a letter or underscore character, and
  • limits subsequent characters to alphanumeric and underscore characters.
PDXpert constraints

If you assign a name that duplicates a system-assigned item name, such as Number or Type, then your assignments are prefixed in the view with an underscore (like _Number or _Type).

PDXpert's public views and External Data Importer templates (for example, the ItemView and ItemMaster template) list common system names. A complete list of data names requires a SQL query: SELECT * FROM (SELECT DISTINCT COLUMN_NAME AS [Name] FROM information_schema.columns) C ORDER BY [Name]

Number of custom attributes

While PDXpert has no architectural limitation on the number of custom attributes defined, there are practical constraints imposed by SQL Server.

A table or view within current versions of SQL Server is limited to about 1000 columns. PDXpert's public views may include multiple side-by-side items, each with their own custom attributes. After deducting PDXpert's standard attributes from the total available SQL columns, the maximum number of unique custom attributes defined across all item types is about 200 (that is, 400 SQL columns).

This maximum number:

  • Is defined on, and limited at, the item type collections. Custom attributes can be added to or removed from Part Types, Document Types or Change Forms as needed, but the sum of the custom attribute definitions should remain within the limit.
  • Refers to uniquely-named custom attributes. If you have a Part Types collection member Design that's been assigned the custom attribute Tolerance, this creates a single pair of SQL view columns, Tolerance and Tolerance_Member. Adding the Tolerance custom attribute to another Part Types member, such as Purchase, doesn't create any new columns.
  • Does not limit the number of items created within a type's custom attribute list. Although the custom attribute definition limits should be observed, you can have virtually unlimited item records with those custom attributes.

Merging custom attribute values into an item name

Each member of the Part Types and Document Types collections includes a name format definition, called a text template. The text template is copied from the part or document type to the new item. The text template can include parameters that are replaced by the values of custom attribute values.

Custom attribute values can be used in the item's name exactly as they're shown on the item's Custom tab. Values can also be modified with formatting commands. For example, most custom attribute values can be converted to all uppercase characters. Dates and numbers can be formatted for a consistent look. Some values can have extended properties, and some text can be converted to title case.

After merging, extra space characters are removed from the name: two or more adjacent spaces are replaced with a single space, and leading and trailing spaces are deleted.

Basic substitution

You can use a parameter more than once, and each can have its own format command.

Names and format commands are case-sensitive. Your parameter name in the text template must exactly match the custom attribute's name.

The name, not the true/false value, of a Data: Boolean is merged into the item name. When the item's checkbox is marked, the checkbox's label is merged into the item name; if the checkbox is not marked, nothing is added.

Short, simple custom attribute names are more useful for merging. In particular, a short Data: Boolean custom attribute like RoHS-compliant is better for merging than, say, Part complies with RoHS standard.

Extended values

Some custom attributes have a pair of values: a primary value and an extended value. You can use one or both values in the text template.

Scheme Primary value {name} Extended value {name++}
UOM Numeric value Unit of measure
Data: Money Numeric value Currency 3-character code
Collection member Name Abbreviation

To merge an extended value into the text template, add ++ to the end of the custom attribute's name. For example, if you have a custom attribute named Length based on the UOM scheme, then use {Length} for the primary numeric value (e.g., 59), and {Length++} for the unit of measure (e.g., cm). A collection member's abbreviation may also be called its Display name or Short name; some collections may not have abbreviations.

Format commands

A format command contains one or more characters that begin with the @ character.

Text case format commands

All database values (except numbers and dates) can be converted to uppercase before merging with the item name. Add the @U format command to the custom attribute's name {name@U} or extended name {name++@U}. For instance, if you have a Part Types collection member named Assembly with an abbreviation Assy, adding @U inserts the values ASSEMBLY and ASSY, respectively. A Data: Boolean called RoHS that's formatted in the template as {RoHS@U} will (when true) be merged as ROHS.

Text contained in a collection member name, a Data: String attribute, and a Data: URI attribute can be converted to "Windows title case". Title case converts the first character of each word to uppercase and the rest of the characters to lowercase. Words that are entirely in uppercase are treated as acronyms, and ignored. Title casing rules in Windows may change over time. You can apply localized Windows CurrentCulture rules with @t (lowercase) or a consistent Windows InvariantCulture using @T (uppercase).

Number format commands

A number format command is a set of characters that specify leading zeroes, trailing zeroes, group separators (e.g., thousands) and decimal separator (as "." point or "," comma). Some specifiers can be single characters; for example, the format command @D specifies an integer without fractional component.

The Windows Control Panel > Regional and Language Options settings affect which characters are used for group separators and decimal separator.

The most common format specifiers are briefly described in the following table. Each custom attribute value can be formatted using a single "Standard" format specifier (like @F3), or several "Custom" format specifiers (like @0.00##E+00).

Some formats may overlap with the attribute's data scheme. For example, if you've already defined a custom attribute as percentage or currency, applying these format commands will be redundant, and the extra formatting may be misleading.

Style Format specifier Description Example output
Standard D Decimal value with optional negative sign.
An optional numeric value specifies the number of digits.
Valid only for the Data: Integer scheme.
D applied to 12345 is 12345
D6 applied to 12345 is 012345
Standard E, e Exponential value with optional negative sign.
An optional numeric value specifies the number of digits after the decimal separator.
The format specifier's case defines the exponent as "E" or "e".
E or E6 applied to 1234.5 is 1.234500E+003
e2 applied to 1234.5 is 1.23e+003
Standard F Fixed-point value with optional negative sign.
An optional numeric value specifies the number of digits after the decimal separator.
F or F2 applied to 12345.6 is 12345.60
F0 applied to 12345.6 is 12346
Standard N Numeric value with optional negative sign. Result is n,nnn,nnn.nn…
where n is 0-9, comma is the group separator, and period is the decimal separator.
An optional numeric value specifies the number of digits after the decimal separator.
N or N2 applied to 12345.6 is 12,345.60
N0 applied to 12345.6 is 12,346
Custom 0 The zero-placeholder symbol forces a "0" where the converted digit is empty. 000000 applied to 12345.6 is 012346
0.00 applied to 12345.6 is 12345.60
Custom # The digit symbol allows a digit where the converted value is defined. ###### applied to 12345.6 is 12346
#.## applied to 12345.6 is 12345.6
Custom . Inserts a localized decimal separator into the formatted value. See examples above.
Custom E0, E+0, E-0
e0, e+0, e-0
Exponential value with optional negative sign.
An optional numeric value specifies the number of digits after the decimal separator.
The format specifier's case defines the exponent as "E" or "e", and + forces the sign character.
0.###E+00 applied to 1234.5 is 1.235E+03
0.00000e-0 applied to 1234.5 is 1.23450e3

For information on these and other format specifiers, search the web for .NET standard numeric format.

Date format commands

A date format command is a set of characters that specify date and time parts, such as current year, month and day. Combine format specifiers to convert a date value: the command @yyyy-MM formats the custom attribute value of March 6, 2016 to 2016-03. Some specifiers can be single characters; for example, the format command @Y is equivalent to @yyyy MMMM.

The Windows Control Panel > Regional and Language Options settings affect non-numeric specifiers, such as names for days and months. If consistency is important across computers, use only format specifiers that define numeric results.

The most common custom format specifiers are briefly described in the following table. The example shows the output when using a date input value of Wednesday, March 9, 2016.

Format specifier Description Example output
d The numeric day of the month from 1 through 31 9
dd The numeric day of the month from 01 through 31 09
ddd The abbreviated, localized name of the weekday Wed in the en-US culture, or the local culture equivalent
dddd The full, localized name of the weekday Wednesday in the en-US culture, or the local culture equivalent
M The month as a number from 1 through 12 3
MM The month as a number from 01 through 12 03
MMM The abbreviated, localized name of the month Mar in the en-US culture, or the local culture equivalent
MMMM The full, localized name of the month March in the en-US culture, or the local culture equivalent
yy The last two digits of the year 16
yyyy The four digits of the year 2016

For information on these and other format specifiers, search on the web for .NET standard date format.



Learn More
Help Guide Contents [PDF]