/
How do I concatenate fields in a lookup?
How do I concatenate fields in a lookup?
Step-by-step guide
- Click on Modules.
- Select the Module with the appropriate form field.
- Select the Forms tab.
- Select Field List button "Create/Update Fields".
- Use the filter to find relevant field.
- Select Edit on the field.
- Select Custom JavaScript tab.
- In the “filter” section type:
for (var i = 0, len = fieldScope.items.length; i < len; i++) {
var item = fieldScope.items[i];
if (!item.descriptionAppended) {
var separator = '-';
item.descriptionAppended = false;
//Check if the item has a description field, otherwise, use the customLongText1 field
//which is the description
var desc = item.description;
if (!desc) {
desc = item.customLongText1;
}
item.text = item.customString1+ separator + desc;
}
}
return fieldScope.items;
Related articles
, multiple selections available,
Related content
How do I show the name of the item and its description in a dropdown?
How do I show the name of the item and its description in a dropdown?
More like this
How to: Add subtext to a Lookup/Text/Numeric Control
How to: Add subtext to a Lookup/Text/Numeric Control
More like this
How do I create lookup list fields?
How do I create lookup list fields?
More like this
How to: Import Items into a lookup
How to: Import Items into a lookup
More like this
How do I connect fields - e.g. Part to supplier and container?
How do I connect fields - e.g. Part to supplier and container?
More like this
How to: Override displayed column for Lookup Field
How to: Override displayed column for Lookup Field
More like this