VIRTUAL_COLUMN lookup field

Question

How can I display a virtual column lookup field on a page so that the modal selection window works correctly?

Answer

define("ContactAddressPageV2", [],
    function() {
        return {
            attributes: {
                "UsrKladrStreet": {
                    dataValueType: Terrasoft.DataValueType.LOOKUP
                },
                "UsrVirtualKladrStreet": {
                    "dataValueType": Terrasoft.DataValueType.LOOKUP,
                    "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
                    isLookup: true,
                    caption: "virtual street",
                    referenceSchemaName: "UsrKladrStreet"
                }
            },
            diff: /**SCHEMA_DIFF*/[
                {
                    "operation": "insert",
                    "parentName": "Header",
                    "propertyName": "items",
                    "name": "UsrKladrStreet",
                    "values": {
                        bindTo: "UsrKladrStreet",
                        "caption": {"bindTo": "Resources.Strings.UsrKladrStreetCaption"},
                        layout: {column: 0, row: 8, colSpan: 12}
                    }
                },
                {
                    "operation": "insert",
                    "parentName": "Header",
                    "propertyName": "items",
                    "name": "UsrVirtualKladrStreet",
                    "values": {
                        bindTo: "UsrVirtualKladrStreet",
                        "caption": "virtual street",
                        layout: {column: 0, row: 9, colSpan: 12}
                    }
                }
            ]/**SCHEMA_DIFF*/
        };
    }
);

 

Like 0

Like

Share

0 comments
Show all comments