Cross Object Formula Fields: linking data from different objects

Occasionally you may want to have a custom field appear in more than one related object in your Propertybase org. This also helps for Reports, Email Templates and Mail Merge documents. This is called a Cross Object Formula. For example, specific information has been created in the Contact tab, which would be also ideal to have in the Listing object, but at the moment can’t be found.  By adding this field it would also be updated the moment the original field is changed, taking note that it is not a copy, only a display. Additional to this, as it displays the value of the field, the data is not editable. This is ideal, for example, if the Company field would be necessary on the Listing object.

The first step is to create a new custom field in the object you wish the new field to be in. Continuing the example from above, the next step would be to go to Setup/Create/Objects and choose Listing.

Click the New button under custom fields.

The field will be of the type Formula.

The output type will be Text.  Choose a name similar to that of the field you wish to copy.

The next step is to create the formula that will call the field that will be replicated.

Click Insert Field, this will pop up a second window.

Search for the desired field and click Insert. Keep in mind that when searching for records names you will find that the name of the field is duplicated. For example, in the above image in the second window there is "Property Owner" and "Property Owner >" (with an arrow). The option without an arrow will provide you with the actual ID of the record, so if you want to display the actual name of the "Property Owner" you will need to choose the option with the arrow ">" and search for the name. In the case that the record you are looking for is a contact, and the first and last name is needed you will need to concatenate the First and Last Name. The following is an example of this:

PropertyOwnerContactID__r.FirstName &" "& PropertyOwnerContactID.LastName

In our example, however we are focusing on bringing the the Company name. The following image depicts this:

The formula will call on the original field and insert the current information displayed in the new one just created.

 

Picklist Value

If the field to be updated is a picklist you must add the Text function for the formula field to work properly.

 

This is due to the fact that picklist values can only use certain functions in formula fields.

Now the information is displayed both in the inventory and offer objects, making life easier.

Multi-Picklist Value

If the field to be updated is a multi-picklist value you will want to use the formula below and reference each picklist value that could be used:

IF( INCLUDES(Multi_Picklist_field_name__c , "Pick List Value 1"), "Pick List Value 1; ","")
&
IF( INCLUDES(Multi_Picklist_field_name__c , "Pick List Value 2"), "Pick List Value 2; ", "")
&
IF( INCLUDES(Multi_Picklist_field_name__c , "Pick List Value 3"), "Pick List Value 3; ", "")
&
IF( INCLUDES(Multi_Picklist_field_name__c , "Pick List Value 4"), "Pick List Value 4; ", "")

Just copy and repeat for each pick list value. Click on the "Check Syntax" button to check for errors. Click Save.

 

 

Powered by Zendesk