Hello, I tried to incorporate an email variable into the form and it worked. Multiple emails should be stored in a list. The problem with using multiple instances in the input was that some patterns were not supported. I renamed the variable and can now add email addresses. Why is there an error when trying to enter currentItem.Email
and field_Email
in the input? Thank you for your help.
Hi @FC_Catalonia,
Do you mind sharing the form? This makes it easier to reproduce the error and to help you fix it.
Regards,
Stephan
Hello here is the form:
{
“executionPlatform”: “Camunda Cloud”,
“executionPlatformVersion”: “8.2.0”,
“exporter”: {
“name”: “Camunda Web Modeler”,
“version”: “54e0234”
},
“schemaVersion”: 10,
“components”: [
{
“text”: “# E-Mail”,
“label”: “Text view”,
“type”: “text”,
“layout”: {
“row”: “Row_10gogy0”,
“columns”: null
},
“id”: “Field_0f1vwqi”
},
{
“label”: “Name”,
“type”: “textfield”,
“layout”: {
“row”: “Row_0pdcc4p”,
“columns”: null
},
“id”: “Field_1c5tqri”,
“key”: “field_Name”,
“readonly”: true
},
{
“label”: “E-Mail”,
“type”: “textfield”,
“layout”: {
“row”: “Row_0gw62lc”,
“columns”: null
},
“id”: “Field_12r02tw”,
“key”: “field_E-Mail”,
“readonly”: true
}
],
“type”: “default”,
“id”: “Form_03xj1i3”
}
Please correct me if I’m wrong:
- You have a list of e-mail adresses
- You iterate over this list with a multi-instance User Task
- You added
currentItem.Email
as the form field’s key to access the current e-mail - The email was not added to displayed
Is that correct?
The form key does not support accessing members/attributes of JSON objects. It will create/assume a variable with the name “currentItem.Email”. Try using input and output mappings to work around this limitation.
Exactly, everything you said is correct. I entered “currentItem.E-Mail” and wrote “field_E-Mail” as the variable key field. Before I wanted to execute it, there was a pattern error. Then, I changed “currentItem.E-Mail” to “currentItem.Text” and “field_E-Mail” to “field_Text,” and the pattern error disappeared.
Hey, so am I understanding correctly that I’m not allowed to write the variable currentItem.Email
, but I should name the variable differently?
It’s not the variable name. It’s the case that you use an object:
{
Email: "",
Name: "",
Adress: ""
}
However, you cannot update the fields of an object via a form. You can only update variables that hold a single value, e.g., numbers, strings and booleans. So you have to split your one variable “currentItem” into multiple variables. You can use input mappings for this. To then update the currentItem, use output mappings.
I get this error Message for the field-E-Mail.
Command ‘CREATE’ rejected with code ‘INVALID_ARGUMENT’: Expected to deploy new resources, but encountered the following errors:
‘Email.bpmn’: - Element: Activity_0jrs63f > extensionElements > ioMapping > input
- ERROR: Expected path expression ‘field_E-Mail’ but doesn’t match the pattern ‘[a-zA-Z][a-zA-Z0-9_](.[a-zA-Z][a-zA-Z0-9_])*’.
[ deploy-error ] 14/9/2023 13:42:10
You cannot use a hyphen “-” in the variable name.
You are right. Thank you it works. The hyphen was the problem.
For some additional information, this is coming to 8.3
@FC_Catalonia you will be able to use keys exactly how you intuitively thought of it, currentItem.email.
Thank you so much
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.