Hi good, day I am so new using CAMUNDA and have not to much experience in angular, I got this new project in my job I have to migrate the actual components they use, for new ones; which are already configured, tested and ready to use. How ever when I’m trying to do it, I got this error from CAMUNDA.
Form failure: Cannot add variable with name : already exists.
This is what I have, once I got the com
<select id="Categoria" name="Categoria" class="form-control"
cam-variable-name="categoria" ng-model="categoria" cam-variable-type="String" required="">
<option value="">Seleccione una OpciÃ³n</option>
The error comes when I try to replace the above component with the one below.
More than answer I would like to know about any useful documentation you can recomend in order for me to learn.
For your time and help, thanks in advance.
Hi billmay, the binding mechanism using the directives
is described here: https://docs.camunda.org/manual/latest/reference/embedded-forms/controls/
cam-variable-name directive will automatically bind the input to the model in case no binding is provided by the user.
If the user provides a customer
ng-model binding, it is respected:
You are using cam-variable-name=“categoria” and are also providing a custom binding ng-model=“categoria” to the same variable (obsolete, remove or use indeed a custom binding).
The component code you are trying to replace with was redacted in the post, but based on the error you seem to be binding twice to the same variable.
Hey, rob2universe, thank you so very much, I will check out all variables.I really apreciate your help and the document link you have shared.
Hey Rob, I forgot to mention the new component we try to implement:
<div class="row" ng-init='options= ["Telecomunicaciones","Infraestructura","Recursos","Software]' >
<drop-down label="Categoria" model="categoria" cam-name="categoria" cam-type="String" read-only="false" options='options' />
This new component, shows the error I am experiencing, I have tried alreaddy to change variables with different names, or modfiying the ones I do have there to make the change. According to the previous answer you gave me, both name and model, their values are changed, how ever still have same error. So, I am kind of confused.
If any idea, I will apreciate your comments.
Please note that the attributes are cam-variable-name and cam-variable-type. You seem to be missing the “variable-” part. (It also seems like the quotes " around Software are not closed)
<label class="control-label col-md-4" for="Categoria">Categoria</label>
<select name="Categoria" label="Categoria" cam-variable-name="categoria" cam-variable-type="String" >
For Those who face the same problem. This is caused by the fact that, we can’t call more than once
camForm.variableManager.fetchVariable(<variableName>)(which is called when we bind with
cam-varibale-name). Make sure you don’t have
cam-variable-name=<variable_name> at the same time, or twice on each in the same form.