After populating data into input field data not setting to input node

Hi Team,

In property panel i have customized popup and populated data into input field but the data is not setting to the node properly.when i will enter manually like data-entry then it is setting to the node perfectly.

How to overcome this problem.Please let me know.

Mycode

group.entries.push({
‘id’: ‘entityName’,
‘description’: ‘’,
modelProperty: ‘entityName’,
label: ‘Escalation Definition’,
‘html’:

’ +
‘Entity Type’ +
’ +
‘’ +
‘’ +
Select’ +
‘’ +
‘’ +
Select’ +
‘’ +
’ +
’,
       set : function(element, values) {
    	  
    	   alert("set=="+element)
		 nodePropagation["entityName"] = values.entityName
		  callNodePropogationFunction(nodePropagation);
	   var businessObject = getBusinessObject(element),
	       newObjectList = [];
	
	   if (typeof values.entityName !== 'undefined' && values.entityName !== '') {
	     newObjectList.push(bpmnFactory.create('bpmn:EntityType', {
	       text: values.entityName
	     }));
	   }
	
	   return cmdHelper.setList(element, businessObject, 'entityName', newObjectList);
	 },
	 
	 
	 get : function(element) {
		// alert("get=="+element)
	   var businessObject = getBusinessObject(element);
	      var documentations = businessObject.get('entityName'),
	       text = (documentations.length > 0) ? documentations[0].text : '';
	       return { entityName: text };
	 },

});

Thanks
-Prameela

Could you please format your source code snippet properly using

```
YOUR CODE HERE
```

This will properly format it and helps us to understand your matter.

Thank you!

Hi,

This is my piece of code i am using

 var entityTypeEntry = ({
			   
			 'id': 'entityType',
		       'description': '',
		       modelProperty: 'entityType',
		       label: 'Entity Type',
		       'html': 
		               '<div class="pp-row" data-show=isEscalationCodeSelected>' +
		                 '<label for="cam-escalation-code">Entity Type</label>' +
		                 '<div class="field-wrapper">' +
		                   '<input id="entityType" type="text" name="entityType" />' +
		                   '<button id="addListener" data-action="addListener"><span>Select</span>                                        </button>' +
		                 '</div>' +
		               '</div>',
			    
		  		
			  });
		 
		 entityTypeEntry.set = function(element, values) {
				nodePropagation["entityType"] = values.entityType
				  callNodePropogationFunction(nodePropagation);
			   var businessObject = getBusinessObject(element),
			       newObjectList = [];
			
			   if (typeof values.entityType !== 'undefined' && values.entityType !== '') {
			     newObjectList.push(bpmnFactory.create('bpmn:EntityType', {
			       text: values.entityType
			     }));
			   }
			
			   return cmdHelper.setList(element, businessObject, 'entityType', newObjectList);
			 };
		 
		 entityTypeEntry.validate = function(element, values) {
		      var entityTypeValue = values.entityType;
		      
		      var validationResult = {};
		      var businessObject = getBusinessObject(element),
		       newObjectList = [];

		      var bo = getBusinessObject(element);
		      var assigned = bo.$model.ids.assigned(entityTypeValue);

		      var idExists = !!assigned && assigned !== bo;
		      if (!entityTypeValue || idExists) {
		        validationResult.id = "Element must have an unique id.";
		      }
		      
		     return validationResult;
		      
		     if (typeof values.entityType !== 'undefined' && values.entityType !== '') {
		 	     newObjectList.push(bpmnFactory.create('bpmn:EntityType', {
		 	       text: values.entityType
		 	     }));
		 	   }
		    }
		 
			group.entries.push(entityTypeEntry);

Thanks
-Prameela

Hi @prameela,

do you see any JavaScript errors in your console? This could help you and us to localize the problem…

Hi Pedesen,

Thanks for your reply.No errors in console.But actually my requirement is i need one popup,from popup i will populate data into text fields.That data need to set for the particular node and saves in database.I’m unable to create popup with the below attached piece of code.

Code

      var entityTypeEntry = entryFactory.textField({
		    id: 'entityType',
		    description: '',
		    label: 'Entity Type',
		    modelProperty: 'entityType',
		    validate: function(element, values) {
		      var entityTypeValue = values.entityType;
		      
		      var validationResult = {};
		      var businessObject = getBusinessObject(element),
		       newObjectList = [];

		      var bo = getBusinessObject(element);
		      var assigned = bo.$model.ids.assigned(entityTypeValue);

		      var idExists = !!assigned && assigned !== bo;
		      if (!entityTypeValue || idExists) {
		        validationResult.id = "Element must have an unique id.";
		      }
		      
		     return validationResult;
		      
		     if (typeof values.entityType !== 'undefined' && values.entityType !== '') {
		 	     newObjectList.push(bpmnFactory.create('bpmn:EntityType', {
		 	       text: values.entityType
		 	     }));
		 	   }
		    }
	  		
		  });
		group.entries.push(entityTypeEntry);

I am creating text field like this.I need popup for this field and data for this field should be populated from popup,that will be set for the node.Please help me to achieve this.

Thanks
-Prameela