Custom attributes

Back up your database before editing 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.

Before you begin editing custom attributes, ensure that:

  • Other users have exited the system.

  • All data transfer services (e.g., ERP/MRP queries, ODBC connections) are stopped.

  • ODBC applications that use local views are closed. Changes to custom attributes can affect the local views database.

  • In your own PDXpert client, all parts, documents and change forms are closed.

Deleting a custom attribute removes its label and data from every related item. You cannot undo this removal; you can only restore the database backup.

After you delete a collection member's custom attributes and before adding new custom attributes, save your edits and then close the PDXpert client and start it again. This ensures that the client's local cache is using the updated database schema.

After you finish editing custom attributes, close the PDXpert client and start it again. Other users should start the PDXpert client before resuming work with an ODBC application that relies on local views. This ensures that the client's local cache is using the updated database schema.

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

Purpose §

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

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

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

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

Where used §

Documents, parts, change forms

Data fields §

Sort §

This integer value (1, 2, 3, ...) determines the sequence in which the custom attribute is shown on the item (left to right, from top to bottom). Missing values do not affect the layout sequence. If the same Sort value is used by more than one attribute, then these attributes are sorted by Name value.

Using gaps between values (2,4,6,…; 10,20,30,…) allows new rows to be inserted without renumbering the current values.

Scheme §
The scheme determines the data type of the custom attribute value, as well as whether there's a unit of measure shown. 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 part type (such as Machine Screw) defines a custom attribute (for example, Length) with a unit of measure (say, cm). As users make 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 same value is shown to all users, regardless of their computer's time zone. The value is not stored as UTC or converted to local time.

  • Data: Float accepts a numeric value with fractional element.
  • Data: Integer accepts whole numbers only.
  • Data: Money is similar to a Float, but also shows 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 lets users select English, French or other active member of the Languages collection.

A custom collection shows as Custom: collection name such as Custom: Colors.

Name §
This is the name of the custom attribute, which is shown 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 Naming custom attributes, below.
Description or use (mouse hover text) §
This describes the custom attribute's purpose. The text is shown in a pop-up when the mouse is moved over the control.
It's helpful to show the expected range of values and data format. For example, instead of a general instruction like Enter the maximum power it's more helpful to say Maximum rating from 1W to 50kW. Users rely on these suggestions to improve their search results.
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 value on existing items.
Default unit of measure §
Units of measure are related to the UOM and Data: Money schemes. 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.
Changing the Default unit of measure on a custom attribute is possible but may impact downstream conversions. Items using the original unit of measure are not updated to the new value.

Setup §

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. The changes are seen when the affected item is opened.

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

Adding a custom attribute §

Read all warnings at the beginning of this topic.

To add a custom attribute to 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. On the Custom list, select a scheme, and name the new custom attribute. See Naming custom attributes, below.
  3. Save the custom attribute: Item ➔ Save, or Ctrl+S.

Deleting a custom attribute §

Read all warnings at the beginning of this topic.

Deleting a custom attribute automatically deletes its label and data value from every document, part, or change form that uses to it.

To delete an existing custom attribute on a Document Types, Part Types, or Change Forms collection member:

  1. In the Collection Explorer, open the collection member that has the custom attribute to be deleted.
  2. On the Custom list, click on an empty area within the row's background to select and highlight the row.

    Custom attribute row selection

  3. Press the Delete key on your keyboard to remove the row.
  4. Save the collection member: Item ➔ Save, or Ctrl+S.

Design guidelines §

Also refer to the help topics under 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 show as column headers in public views and database queries.

Many types can share the same custom attribute Name. In this case, the item types' custom attribute values, regardless of scheme differences, are inserted 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 Transforms and Views collections, and simplifies data exchange with other software systems.

Attribute name summary §

The best custom attribute name (a) doesn't conflict with a standard PDXpert data column name, (b) begins with a letter, (c) contains only ANSI Basic 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 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 insert custom values. Use the Description or purpose text for longer explanations or instructions.

  • Avoid using 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 either-or options. When there are three or more options, use a custom collection to limit users' choices like Not applicable / Yes / No.

  • Avoid using unnecessary uppercase letters, which need extra space on small screens; for example, Organization is often better than 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, when the Sort numbers are sequential, use the odd numbers (1,3,5,...) for shorter labels and data, and even 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 specified 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: http://msdn.microsoft.com/en-us/library/ms189822.aspx

Refer to this Microsoft SQL Server help topic for naming guidance: http://msdn.microsoft.com/en-us/library/ms175874.aspx

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 give a custom name that matches a system name, such as Number or Type, then your values are prefixed in the view with an underscore (like _Number or _Type).

PDXpert's public views and Batch Importer templates (for example, the ItemView and ItemMaster template) show 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]

PDX package XML constraints §

The IPC-2750 standards use the W3C XML technology standard. While PDXpert handles most of the details, your custom attribute names must conform to the XML standard, particularly regarding letter case and whitespace.

Your custom attribute's name is exported into PDX packages as an XML AdditionalAttribute element's name attribute value. Differences in letter case or whitespace may prevent an export, or create inconsistent PDX export packages, or cause errors importing the PDX package into other software.

  • Characters in the XML attribute name are case-sensitive. No case conversion ("folding") is performed before strings are matched, thus A and a are not the same.

    Rule: When a custom attribute name is used on more than one item type, use the same letter case for every type's name. For example, a Purchase part's custom attribute name="RoHS" and a Design part's name="ROHS" may cause processing errors.

  • A validating XML importer may normalize attribute values by replacing whitespace (0x09, 0x0A, 0x0D, 0xA0) with a space (0x20) character; discarding leading and trailing whitespace; and compacting multiple whitespace characters to a single space.

    Rule: Use only normal space characters. Do not use new line or tab characters, leading or trailing space characters, or sequences of space characters.

Number of custom attributes §

PDXpert has no architectural limitation on the number of custom attributes specified, but there are practical constraints imposed by SQL Server and search indexing.

A table or view in 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 specified across all item types is about 200 (that is, 400 SQL columns).

This maximum number:

  • Is specified 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 with the custom attribute Tolerance, there is a pair of SQL view columns, Tolerance and Tolerance_Member. Adding the Tolerance custom attribute to a different Part Types member, such as Purchase, doesn't make any new columns.
  • Does not limit the number of items that use a custom attribute list. Although the custom attribute definition limits should be observed, you can have virtually unlimited item records with those custom attributes.

Compared to PDXpert's standard attributes, indexing a custom attribute for search needs much more time. Its name and scheme must be examined, and then attached to the item's standard index results. Adding or deleting a custom attribute updates all related items, which requires time to assign the starting value and re-index the items.

Batch Importer: Importing custom attribute values §

See the Batch Importer: Definitions help topic section for rules on importing custom attribute values.

Inserting 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 inserted into the item's name exactly as they're shown on the item's Custom page. 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 inserting, extra space characters are always removed from the name: two or more adjoining spaces are replaced with a single space, and leading and trailing spaces are deleted.

Setting up a type's custom attribute for inserting §

In the Collection Explorer, make or open a Part Types or Document Types collection member:

  1. On the collection member's Custom list, add a new custom attribute or find an existing custom attribute. Notice the custom attribute's Scheme and Name. In this example, we'll say the Scheme is Data: String and the Name value is Rating.

  2. On the collection member's Attributes page, use the custom attribute's Name value in the Part name template or Document title template. Show the custom attribute's Name value as {value}, along with any other text you want in the template. In our example, let's use: Motor, {Rating}. The Data: String scheme allows the inserted value to be formatted as uppercase: Motor, {Rating@U}.

In the Item Explorer, make an item that's based on this collection member:

  1. On the new item's Custom page, enter the value into the custom attribute. For example, in the Rating custom attribute, enter 100 watts.

  2. On the new item's General page, click the Name{x} button to insert the actual rating value into the default part name. In our example, Motor, {Rating} becomes Motor, 100 watts. If the template is Motor, {Rating@U}, then the item description becomes Motor, 100 WATTS.

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.

When the scheme is Data: Boolean, then the custom attribute Name, not the true/false value, is inserted into the item description. In other words: when the custom attribute checkbox is marked, the checkbox's label is inserted into the item name; if the checkbox is not marked, an empty string replaces the parameter.

Short, simple custom attribute names are more useful for inserting. In particular, a short Data: Boolean custom attribute like RoHS-compliant is better for inserting 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 insert 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.

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 commands can be single characters; for example, the format command @D specifies an integer without fractional element.

The client workstation's Windows Control Panel ⏵ Region settings affect which characters are used for group separators and decimal separator.

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

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

Style Format command 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 command'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 accepts a digit where the converted value is specified. ###### 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 command'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 commands, search the web for .NET standard numeric format.

Date format commands §

A date format command uses date and time parts, such as year, month and day. Put together commands to convert a date value: the command @yyyy-MM formats the custom attribute value of March 6, 2019 to 2019-03. Some commands 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 commands, such as names for days and months. If consistency is important across computers, use only format commands that define numeric results.

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

Format command Description Example output
d The numeric day of the month from 1 through 31 6
dd The numeric day of the month from 01 through 31 06
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 19
yyyy The four digits of the year 2019

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

Text format commands §

Custom attributes values – except numbers and dates – can be inserted as uppercase or lowercase. Add the @U or @L format command to the custom attribute's name {name@U} / {name@L}, or extended name {name++@U} / {name++@L}. For instance, if you have a Part Types collection member named Assembly with an abbreviation Assy, adding name@U inserts ASSEMBLY while adding name++@L inserts assy. A Data: Boolean called RoHS that's formatted in the template as {RoHS@U} will be inserted as ROHS when the value is true.

Text can be inserted using Windows title case when it's a collection member name, a Data: String attribute, or a Data: URI attribute. Words that are in uppercase are treated as acronyms, and are ignored. You can apply localized Windows CurrentCulture rules with @t (lowercase) or a consistent Windows InvariantCulture using @T (uppercase). Microsoft's title casing rules may change over time.

2050

Help Guide Contents [as PDF]