How to get value enter in field of control panel of camunda modeler


#1

Hello,
My problem is when i enter value in the field of control panel i need to get this value and insert it in database. for example when i enter 30 in field “coût” i need to get this value and insert it in database.

that’s my code in the field implementation/costProp.js

‘use strict’;

var entryFactory = require(’…/…/…/…/factory/EntryFactory’),
isIdValid = require(’…/…/…/…/Utils’).isIdValid,
getBusinessObject = require(‘bpmn-js/lib/util/ModelUtil’).getBusinessObject;

var ScenarioHelper = require(’…/…/…/…/helper/ScenariosHelper’),
getScenarioById = ScenarioHelper.getScenarioById,
getMetricsByElementId = ScenarioHelper.getMetricsByElementId;
var debug = require(‘debug’)(‘cost-props’);
module.exports = function(element, options) {

options = options || {};

var id = options.id,
reference = options.reference,
label = options.label;

var costEntry = entryFactory.textField({

id: id || 'cost',
label: label || 'Coût',
modelProperty: 'cost',
reference: reference,
editable: true,
get: function(element, node) {

},
set: function(element, values, node) {
}

});

return [ costEntry ];

};

Can someone help me to get the value that i enter in field of control panel?


#2

Hey, in your set function you should get the entered value as a property of values.