...
Info |
---|
The reloadItemData() API can only be used when the View ID is specified for the form item. This view ID will contain the COLUMN_ID that must be specified for the form item (field). The view specified for the form items must be 'Grid' only. All types of grid views supported by Canvas can be used for auto-populating dependent fields. The reloadItemData() API can be used to auto-populate dependent fields' values for the following form items:
|
...
Code Block | ||
---|---|---|
| ||
canvas.form.listeners.TestAddBeneficiaryAdd = Class(canvas.Observable, { constructor: function(config) { this.fm = config.fm; }, registerHandlers: function() { this.fm.registerHandler("cbxchange", "Bank_Name_ID", function(fm, event, fieldName, value) { if (!canvas.isEmpty(value)) { this.fm.reloadItemData([ { itemId : 'Branch_Name_ID', filters : { BANK_NAME : [value] } }]); } }); } }); CFLR.registerListener("BENE_DETAILS_ID",canvas.form.listeners.TestAddBeneficiaryAdd); // Here, Bank_Name_ID is the form item ID for the Bank Name field. // Branch_Name_ID is the form item ID for the Branch Name Field. // BENE_DETAILS_ID is the form ID. // itemId and filters are the filter conditions. // In this code, the Branch Name field value is being filtered based on the Bank Name. |
...