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.