Aras Fundamentals: Adding Detailed Properties

Aras Fundamentals: Adding Detailed Properties

This post will cover the common varieties of Properties that an ItemType can have, each of which has useful applications in Aras Innovator. We assume that you already have an ItemType such as the Purchase Orders ItemType from this article and that we need to extend the capabilities of our Purchase Order ItemType. We’ll give step by step instructions for adding a property, specifying the data type of that property, and the uses of advanced data types such as filtered lists. To follow along, you’ll need to be an administrator on your Aras Innovator instance. The screenshots and specific steps in this post were made using Aras Innovator Version 12 Service Pack 2. While the steps should be similar if you’re on Version 12 ,you may notice small changes if you're using a different service pack.

Adding a Property

We'll be adding a number of properties in this article. Each time, there will be some variation in which Data Type we choose, and which optional columns we make use of, but the basic flow will remain the same. First, we need to make sure we've opened up our ItemType.

  1. Open the Table of Contents -> Administration, and there you'll find ItemTypes. Left click on that.
  2. Click Search ItemTypes and type the name of the ItemType you want to modify in the Name column. For the rest of this example, we’ll use the Purchase Order ItemType, but you can use whatever ItemType you’ve made.
  3. Hitting Enter or clicking Search will run the search. 
  4. Open your item in the results table either by double clicking or by right clicking and choosing Open.

We can leave Now that the Purchase Orders are open, we need to edit them.

  1. Click the Edit button   and in the Properties tab.
  2. click the Add Row button  at the top left of the tab.
  3. A new row appears, and we can enter information for our new property.

 Each new property we add, we’ll come back here and click the Add Row button.

Now that we know the basics, lets get in to the details.

Common Data Types

When making our Purchase Order ItemType we made two properties, _price and _name. We specified Names, Labels, and Data Types for both, and _name had a Length. What does all that mean?

  • Name is how a property is identified from Aras Innovator’s perspective
  • Label is a more human recognizable term that will be used in views and menus.
  • Data Type is used to determine what kind of information will be stored here, and we’ll spend a portion of this article going over the different types and their use cases.
  • Length specifies the maximum number of characters that a property with the Data Type String can contain.
  • Some values, like Length and Precision, are only used for certain data types. A description of all such columns can be found in the Just Ask Innovator documentation.

A brief digression on Data Types:

  • String and Text can both be used for information like the sentence “String and Text can both be used for information like this sentence” so what’s the difference?
    • String limit is defined by Length. (A character is a symbol, like the letter “a” or the digit “1” for example.)
    • Text has a much, much larger maximum, but also takes up more space and is slower.
  • Similarly, Integer, Decimal, and Float are all used to store numbers, but they have some important distinctions.
    • Integers store whole numbers like “5” or “451”
    • Decimals can have decimal places to some specified level of precision via the Precision column.
    • Floats provide vast range of possible values without needing to specify to what decimal place it will store, but often cause rounding issues. 
  • Dates have the specific use of storing, well, a date!
  • For the moment, the last datatype to mention is the Boolean, which simply stores a true or a false. Booleans are often used for check-boxes; checked, or unchecked.

We’ll get into List, Filtered Lists, Sequences, and Items later. First, lets use some of the Data Types above!

First, let's take a quick look at the Name property from the last article.

  1. Things that we want to keep from before:
    1. We can see we gave it the name "_name" which is the internal way to refer to that property.
    2. We also see we gave it the label "Name" which is how it will be displayed to the user.
    3. The Data Type should be a string, because we want to store a short bit of text.
  2. Things we want to add:
    1. We want to make sure that we never repeat a name, so we check Unique to ensure that each Purchase Order needs to have a different value here.
    2. Every Purchase Order needs a name, so we mark Required, which means that a Purchase Order will not be able to be created without having this property filled in.
    3. Lastly, go to the Keyed Name Order column. This is used sometimes to display information from system messages, and can make use of multiple columns. Put a 1 here.

We have also decided that each Purchase Order should have an phone number associated with it. Most of the time a Purchase Order will have the same number associated with it, that of our purchasing department, but not always. We do want to validate that whatever is entered, it conforms to the structure of a phone number. Let's make a new property for that!

  1. Give the property the name "_phone" and the label "Phone Number".
  2. Set the Default Value column to that of our fictitious purchasing department, which is "978-555-0101" in this example.
    1. Default Value is used to prefill what information will be in a field, so by putting our number there, we make it easy for someone quickly creating a Purchase Order to leave the default there and focus on the novel information.
  3. Set the Pattern column to a regular expression matching phone numbers
    1. Pattern accepts a regular expression which it will ensure values entered into the property adhere to, so for phone number  "\d{3}-\d{3}-\d{4}" will do.
    2. A proper explanation of regular expressions could be an entire blog post or more- but fortunately, a blog post on that already exists.
    3. Within Aras Innovator, the Pattern column is ideal for validating that the right kind of information has been entered.

Advanced Data Types

In our example, Purchase Orders sometimes have a particular customer associated with them. We could save half a dozen details about the customer, but there’s an easier way. Something to remember whenever you’re working with Aras Innovator is that almost everything is an item. As such, it’s no surprise that sometimes the most useful thing for a property to store is an item!

  1. Make a new property, named "_customer" and labeled "Customer"
  2. Give it the DataType of Item.
  3. "Customer" is a standard ItemType, and so for Data Source we can open the search dialog by clicking Search Dialog and look up Customer. Select it and click OK.
  4. Now all the relevant information about the Customer related to a Purchase Order can be referenced with a single property.

What if we need to let users pick from some constrained set of options? Every Purchase Order is made from some country, but if we let users type in any country they like then we’ll wind up with “USA”, “U.S.”, “The United States”, and “America” if we’re lucky. (If we’re unlucky, someone will type “Anreica” and not realize it.) Lists are an existing ItemType, ideally suited to providing dropdown lists for users to select from.

  1. Create a new Property named "_country"
  2. Give it the label “Country of Origin”
  3. Give it the Data Type of "List".
  4. Set the Data Source. There's a standard list in Aras Innovator called "Countries" that we can use.

Remember that you can combine these, using multiple columns to get the functionality you want. For example, we can the Default Value as Canada, assuming that most purchase orders will be from there. That will pre-fill the field with Canada but still allow a user to change it.

It would be nice to have more specific location information than just the country. One powerful technique is combining a List with a Filter List. There's a standard list called States that's configured as a filter list, and contains both U.S.A. states and Canadian provinces.

  1. Create a new property named "_province"
  2. Give it the Label “Provinces”
  3. Give it the Data Type Filter "List".
  4. Set the Data Source to your list, in this case the "States" list.
  5. Set the Pattern as the property we want to filter on, in this case "_country"

By setting the Data Source to the States list, if the country is set to Canada then the user will be able to select from any of the Canadian provinces. If they had picked the United States they would instead be presented with the various states, and the "State"s list can be expanded for any other countries we need to support. You can also change the name of the States list to be Provinces.

A filtered list in the form

Like Lists, Sequences are Data Types that reference specific items, with specific behaviors around them. One typical use of a sequence is to provide quick unique values, for example sequential item numbers. Here, lets give our Purchase Order one!

  1. Create a new property named  "_ponumber" property, labeled PO Number
  2. Give it a Data Type of Sequence
  3. Give it a Data Source of a sequence you've created.
  4. Be sure not to mark this as Required- sequences populate themselves after an item is saved!
  5. Go over to the Keyed Name Order we mentioned back when adjusting the name property. Set this to "2" so that system messages will use both the name and the PO number. 

Conclusions and Congratulations

Today, we added a lot of functionality to our Purchase Order Item Type via the power of properties. Purchase Orders now have a lot more information in them, and the same tools we've discussed can be used for even more utility! We also briefly went over some of the various Data Types like Strings or Lists, as well as many of the columns a property can make use of such as Required and Pattern. An Item Type can be as simple or as complex as needed, so next time you're adding a property keep your options in mind. Does this property need to be unique? Does that property need need validation that you can accomplish with Pattern? 

If you have more questions about this, please do comment below and let us know! Some questions can be answered with a quick comment, and some might be fertile ground for future articles!