Hi Team,
Could anyone please help me achieving the things below?
I have added two custom attributes in the client module.
One of lookup type and the other for text. As soon as the user selects the value in the Title Dropdown, the Description text field should be auto-populated with the corresponding value of description being fetched from a data source of Title.
The source lookup is as follows:
attributes: {
"UsrTitle": {
dataValueType: Terrasoft.DataValueType.LOOKUP,
type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
isSimpleLookup: true,
referenceSchemaName: "UsrTitle",
isRequired: true,
},
"UsrDescription": {
dataValueType: Terrasoft.DataValueType.MAXSIZE_TEXT,
type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
value: ""
}
}
diff: [
{
"operation": "insert",
"name": "MyMenu",
"propertyName": "items",
"values": {
"generateId": false,
"itemType": Terrasoft.ViewItemType.CONTAINER,
"items": []
}
},
{
"operation": "insert",
"parentName": "MyMenu", // The container where the input box will be added
"propertyName": "items",
"name": "UsrTitle",
"values": {
"bindTo": "UsrTitle",
"labelConfig": {
"caption": "Title"
},
},
"bindTo": "UsrTitle",
"enabled": true,
"contentType": 3
},
{
"operation": "insert",
"parentName": "MyMenu",
"propertyName": "items",
"name": "UsrDescription",
"values": {
"bindTo": "UsrDescription",
"labelConfig": {
"caption": "Description"
},
"contentType": 0,
"layout": {
"column": 4,
"row": 5,
"colSpan": 20,
"rowSpan": 4
},
"controlConfig": {
"placeholder": "Enter your text here"
},
"classes": {
"wrapClassName": ["custom-input-box-class"]
}
}
},
{
"operation": "insert",
"parentName": "MyMenu",
"propertyName": "items",
"name": "MainContactButton",
"values": {
"itemType": Terrasoft.ViewItemType.BUTTON,
"caption":"Create Ticket",
"enabled": true
}
},
]
Please note that this is a custom client module which does not belong to a section, hence not able to achieve this using the OOTB business rules. Kindly help!
Thanks,
Sarika