Hello
I am trying to update a lookup field linked to Employee section for multiple records using an input box. But, the list of records are not displaying either by typing in the field or clicking on magnifying glass icon.
I have tried using every property for binding this to the object. But none of them works. I have attached the code snippet of this custom action for reference.
So please suggest a way to bind it to the correct schema and display its correct records.
Regards,
Malay
Like
Hi Malay,
Lookups are usually looking like that.
You can add "isSimpleLookup" to the virtual lookup attribute to make it a drop-down , so it might be much convenient for you.
Example:
"YourLookup": { dataValueType: Terrasoft.DataValueType.LOOKUP, isSimpleLookup: true, referenceSchemaName: "Employee" }
Best Regards,
Bogdan L
Hi Bogdan Lesyk,
Thank you for your response.
I was asking about the binding of object with this virtual lookup. As, this is not properly bind with any object, it is not showing any values.
I have also inserted the property referenceSchemaName: "Employee" but it still does not show any values.
Regards,
Malay
Malay,
If you don't see any values of your Lookup, you've probably added wrong name of the object your Lookup should referring to.
Please check out the example of how it should looks like:
https://community.creatio.com/articles/virtualcolumn-lookup-field
Also check out the code my test implementation:
attributes: {
"UsrTestLookup": {
"dataValueType": Terrasoft.DataValueType.LOOKUP,
"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
isLookup: true,
caption: "virtual street",
referenceSchemaName: "Employee",
isSimpleLookup: true
}
},
diff: /**SCHEMA_DIFF*/[
{
"operation": "insert",
"parentName": "ProfileContainer",
"propertyName": "items",
"name": "UsrTestLookup",
"values": {
bindTo: "UsrTestLookup",
"caption": {"bindTo": "Resources.Strings.UsrTestLookupCaption"},
layout: {column: 0, row: 8, colSpan: 12}
}
},
As far as I choose
"parentName": "ProfileContainer"
and
isSimpleLookup: true,
please check out the result of such implementation.
So on Contact page I've got my "some lookup test" which has it's values from "Employee" object which it refers to.
Also please note, that Virtual Lookup columns most often exist to store intermediate values, that can be further used for data processing.
Best Regards,
Bogdan L.
Hi Bogdan,
How to add filter to the virtual Lookups, I had followed the above method to add virtual lookup. And when I tried to add filter to that, its not filtering out the data.
I have attached my code for the reference,
After adding the filter I am able to see all the values in the Lookup.
Is there a way, to Filter the Lookup values in Virtual lookup column ?
Regards,
Adharsh S