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 @anon64962691,
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
@anon64962691 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.