A Foreign Data type is used to represent a property belonging to Item 1 as a property of Item2. In the example below, we will create a new ItemType definition, called TestPart, and give it two properties - the first will be of type Item and will reference a Document ItemType; the second will reference a property of the Document ItemType, called name, which will then become a Foreign property of the TestPart ItemType.
To create a Foreign Data Type:
Auto Search - checked
TOC Access - , or any other Category and access of your choice (see TOC Access)
Can Add - allow the World identity to add (see Can Add)
Permissions - allow the World identity to get, update, delete, and change access (see Permissions)
Add a property called SpecDocument, make it of Data Type Item, and Data Source should be set to Document.
Add another property, called SpecID, make it of Data Type Foreign. When you select the Data Source column, you will see a Foreign property selection dialog, listing all the Item type properties of this new ItemType (You can only select a property of an Item that is already declared as a property).
Select spec document, since this is the Item whose property we want to reach, and open the list of its properties, by selecting the plus icon to its left. The list of properties is shown:
Select the name property by double clicking it. The dialog will close, but it will not display the property name anywhere.
Save the itemType definition. You should see the name property appear in the Foreign Property column of the Spec ID property row.
Once you have created a Foreign property for your ItemType, let's see how it appears on the form. Most likely you would not want it to appear on the form at all, but if you do, it will not be accessible by the user. Here is how the TestPart instance would look:
Once you select the SpecDocument, and save the item, then the Spec ID (the Foreign Property) is automatically filled in, and is read only.
©2023 Aras Corporation - All Rights Reserved