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. Open the Table of Contents -> Administration, and there you'll find ItemTypes. Left click on that. 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. Hitting Enter or clicking Search will run the search. 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. Click the Edit button and in the Properties tab. click the Add Row button at the top left of the tab. 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. Things that we want to keep from before: We can see we gave it the name "_name" which is the internal way to refer to that property. We also see we gave it the label "Name" which is how it will be displayed to the user. The Data Type should be a string, because we want to store a short bit of text. Things we want to add: 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. 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. 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! Give the property the name "_phone" and the label "Phone Number". Set the Default Value column to that of our fictitious purchasing department, which is "978-555-0101" in this example. 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. Set the Pattern column to a regular expression matching phone numbers 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. A proper explanation of regular expressions could be an entire blog post or more- but fortunately, a blog post on that already exists. 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! Make a new property, named "_customer" and labeled "Customer" Give it the DataType of Item. "Customer" is a standard ItemType, and so for Data Source we can open the search dialog by clicking and look up Customer. Select it and click OK. 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. Create a new Property named "_country" Give it the label “Country of Origin” Give it the Data Type of "List". 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. Create a new property named "_province" Give it the Label “Provinces” Give it the Data Type Filter "List". Set the Data Source to your list, in this case the "States" list. 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. 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! Create a new property named "_ponumber" property, labeled PO Number Give it a Data Type of Sequence Give it a Data Source of a sequence you've created. Be sure not to mark this as Required- sequences populate themselves after an item is saved! 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!0Views0likes0CommentsAras Fundamentals: Advanced Properties
This post will cover some of the more complex but no less useful ways you can use Properties in Aras Innovator. We’ll go over Foreign properties, some Property Settings such as Item Behavior and Default Search, and even Property Events. In this article, we assume you already have an ItemType such as the Purchase Orders ItemType from the Aras Fundamentals series article to build on. To follow along, you’ll want to be an administrator in Aras Innovator. The screenshots in this post were taken on Aras Innovator Version 12 Service Pack 2, and while the steps should be similar if you’re on Version 12 you may notice small differences in what you see if you’re using a different service pack. Foreign Properties The simplest way to think of a foreign property is that it lets you reference another item, making a relationship between the two. The Foreign Property value, which isn't set directly, stores the property name of the other item. You might use a Foreign Property for example if you wanted to reference the address of the customer associated with a Purchase Order. Last time, we made an Item property to reference Customer: if you need to revisit how to do that, take a look at this article. To use foreign properties of Customer, use the following steps: From the Properties tab of the Purchase Order ItemType, click the Add Row button. First, we need the basics for a property. Enter “_customer_address” for the name, and “Customer Address” for the label. We need the name for the system, and the label so it’s clear to users what this represents. Select “Foreign” for the Data Type. Click on Data Source. In the dialogue, look for _customer, and click the expand icon. Double-click on Address. Click Save. If you look at the Foreign Property value of _customer_address, you’ll see it just says “address.” While it gets set by what you use for Data Source, this is a quick way to look at what property of that other item your new property is using as a reference. Columns The Item Behavior column is only useful where the property is on versionable items. When the Item Behavior is set to Float, it will always reference the latest version of the item. Once set, there’s little need to change this, but it can be important to be sure which generation of something you’re working with. On a similar note to tracking version, the Track History checkbox can be checked to ensure that changes in the property are recorded in the history of the item. It only applies to the properties with this checked, meaning that your history can record some properties and not others. A Default Search can be used to set up, in advance, a search that a user can run as soon as they open up an item for searching. While the user can override this search, it’s useful if there’s one main search that you know most users will go into that ItemType looking for. For example, perhaps you want your users to prioritize purchase orders with prices above a certain threshold; in that case one could arrange for Purchase Orders to default to searching for things with a price above 100. From the Properties tab of the Purchase Order ItemType, look for the _price property. In the Default Search column, type “>100” to specify that the search should return only things with a price above 100. Click save. Now, if you find Purchase Orders in the table of contents and open a new search, you should see that there’s already some criteria in the Price column. This can be combined with Autosearch for very convenient searching, or simply used to pre-fill some suggested searches. Unfortunately, searching for "the best item" doesn't turn up results in most environments. Next update maybe! Property Events Properties can have methods tied to them, triggering when certain events take place. This allows you to build up complex functionality from the methods you have available, and even simple methods can be exceptionally convenient. To set up a property event, follow the following steps: From the Properties tab of the Purchase Order ItemType, right click on the property you’d like to make an event for. From the menu that results, click Properties, and then click Open. A new tab will open for that specific property. Below, you should see the Event tab. You’ll need to click Edit to open up the property for changes, but once you’ve done that you can click the select icon to see a dialogue where you can search for the method you want. Select it, then click OK. In the resulting new row, you’ll see an Event column. If you click the cell, then click the dropdown icon, you’ll see the list of events to choose from. What kinds of things can property events be useful for? OnEditStart is an event that begins as soon as you begin to change the property. A method here that might be useful would be one that set a related property, for instance if you had one property for whether a purchase order had multiple associated delivery dates then beginning to edit the field for the second date could alter the first property without needing to manually do it. OnEditFinish will activate when someone is done editing and clicks away, and here it can sometimes be useful to bring up a confirmation message in the case where the information would be both unusual to change and very important to get right. There’s also the OnEdit event, should you have need of that. The OnChangeCell event can be used to create an autosave, saving the form whenever you changed away from the property. OnSearchDialog will activate as a search dialogue starts up. One clever use of this event is, when searching Identities, to set the search only to return and display identities that represent user accounts instead of say, a group like Administrators. The OnGetValue event can be used to interact with the results of a search, for instance removing some category prefix from the name of items. Conclusions and Congratulations In this post, you’ve learned how to make use of advanced item properties such as foreign properties. You’ve set up a default search for our Purchase Orders, and learned about the various events a property can have. We haven’t covered all of the columns, but remember that if you’re ever curious about their usage Just Ask Innovator is always available. If you have more questions, feel free to get in touch in the comments below! Where can these tools be best used in your organization? Is there a search common enough to make the Default Search, or a property event you could set up to make things more efficient? In Aras Innovator, sometimes helpful changes are only a few clicks away.0Views0likes0Comments