Question

changes Happen immediately

How can i change the field of one text and reflects its value of other field without clicking the save button .

For say , How will i print the sum of two number in different text field without clicking the save button 

Like 0

Like

3 comments

It can be implemented via an event listener to the field for the event "change". Please add "dependencies" for that. The example below demonstrates how to change a value in the field "JobTitle" immediately after changing a value in the field "Job": 

define("ContactPageV2", [], function() {

    return {

        entitySchemaName: "Contact",

        messages: {  },

        attributes: {

            "JobTitle": {

                dependencies: [

                    {

                        columns: ["Job"],

                        methodName: "jobChanged"

                    }

                ] 

        },

        rules: {},

        details: /**SCHEMA_DETAILS*/{   }/**SCHEMA_DETAILS*/,

        modules: /**SCHEMA_MODULES*/{  }/**SCHEMA_MODULES*/,

        mixins: {  },

        methods: {

           /**

             * Updates job full title field on job change.

             */

            jobChanged: function() {

                var job = this.get("Job");

                var jobTitle = this.get("JobTitle");

                if (this.isNotEmpty(job) && this.isEmpty(jobTitle)) {

                    this.set("JobTitle", job.displayValue);

                }

            }

        },

        diff: /**SCHEMA_DIFF*/[  ]/**SCHEMA_DIFF*/

    };

});

 

Please share the complete step wise detail of how to perform this task,

 

Please follow the "Adding calculated fields" article by the link below. Note that the implementation of the functionality would need some JavaScript development skills.

https://academy.bpmonline.com/documents/technic-sdk/7-13/adding-calculated-fields

Show all comments