Tip: How to work around issues of a Lookup field when it's definition includes appended child fields
When using the very nice feature, in a Lookup field's definition, of appending child attributes, such as
- Property_Name + ", " + City + ", " + State
The result in the dropdown is a NICE combination display that really helps the user identify the correct choice. And, the appended fields are even included in the search-as-you-type.
However, the result on Reports is not necessarily good, because that combination is always shown as the field's value. (Or if you use field.name it is not clickable to show the record popup.) You may not want that in a report since you already have each available as separate columns, and using as separate columns is often preferred.
We've requested an enhancement that when defining the appended fields, an option to use that on the "dropdown only" vs. "dropdown and reports". However, we just realized and used an easy workaround :-)
WORKAROUND
- Simply create a duplicate Lookup field, the same as the first, except don't append the child values.
- In deluge, in OnAdd.OnSuccess, and OnEdit.OnSuccess simply copy the value to the new field:
Field2 = Field1;
- (OnSuccess is best for us since it works even when importing new records. It probably works when updating existing records via Migration tool. Just remember that no scripts fire via bulk edit.)
- Use that new field Field 2 as your display in Reports! It will be just the main value, and will be linkable to the popup.
We are hoping that on the same form, having 2 Lookups to the same other table won't present any problems. This is the first we've done this and haven't really used it in production.
So in summary - the best of both :-)
- The original field (with the appended child fields) is visible on the form and helps users make the right choice.
- The extra field (no appends) and probably hidden on the form, is used instead on reports and is clickable for the record popup.