Formating View Text in the LookupField

Hello together,

in the old AddIn "CrossSite Lookup" from Plumsail, was there the possibility, to put the selection text together from 2 field texts.

LookupList
Field 1 = Short Text
Field 2 = Description Text
Field 3 .....

Actualy List
LookUpField save the Value from [Field 1] view the selection "Field 2 + (Field 1)"

How can you do something like that again?

Hi @Pro2000MD,

Yes, it's possible with the new Lookup fields and controls. Here's how:

1 Like

Thank You :slight_smile:

Best greetings

Hi @ilialazarevskii,

I don't quite get it right yet.

fd.spBeforeRender(function() {
    var template = '#: data.LookupValue # OT #: JSON.parse(data.Von).Ortsteil # (#: JSON.parse(data.Von).Gemeinde #)';
    fd.field('Von').widgetOptions = {
        template: template,
        height: 400,
        virtual: {
            itemHeight: 30
        },
        dataSource: {
            pageSize: 16
        }
    }
})

This works not.
I have the Fields "Ortsteil" and "Gemeinde" as "Expand fields" and "Extra fields" inserts in the Designer.
What else am I doing wrong?

It's been dealt with!

fd.spBeforeRender(function() {
    var template = '#: data.LookupValue # OT #: data.Ortsteil # (#: data.Gemeinde #)';
    fd.field('Von').widgetOptions = {
        template: template,
        height: 400,
        virtual: {
            itemHeight: 30
        },
        dataSource: {
            pageSize: 16
        }
    }
})

This works!

Thanks for Help.