1. What is the issue? Please be detailed.
I have a multilingual form that references entities to ensure that no duplicate entries are made. If the data collector enters an ID that is recorded in the entities, they are asked to confirm whether 4 matching variables match the data they are entering. If so, it is considered a duplicate entry.
The warning message appears correctly, referencing the data in the entity, in 2 of the 3 languages (German and Italian), but is not appearing correctly for 2 of the matching variables in French. Instead, it prints the entire entity call, for example: "instance('primary_v3')/root/item[id_journal=1]/mgeburtsdat" instead of "2002"
2. What steps can we take to reproduce this issue?
Please find attached the .csv file for the entity and the xlsx form
3. What have you tried to fix the issue?
I have copied the entity calls from the languages that work properly into the French version of the form, so I know that the syntax of the call is exactly the same across all languages. This does not resolve the issue.
4. Upload any forms or screenshots you can share publicly below.
primary_warningtest.xlsx (16.1 KB)
primary.csv (338 Bytes)
Hi @kristen.jafflin
The problem is not in the entities, it is the single quote in the French label that mess up the things.
"l'enfant"
you need to "escape" the single quote as fixed in the attached file.
Aurelio
primary_warningtest.xlsx (16.0 KB)
1 Like
Thank you. That solved my problem with some tweaking. In summary, to avoid problems like this, when entering notes that draw data from an entity using an "instance" command (e.g., "instance('primary_2f')/root/item[id_s2=${id_match}]/mgeburtsdat_s2"), any text including an apostrophe (') needs to replace the apostrophe with ' because the apostrophe will be read as something other than text by the system, causing problems in the text displayed.
When I tested whether this replacement was also possible in text in other questions and notes, it was not. If I did the same replacement in other text to be displayed in the form, ' displayed instead of an apostrophe. Anyone else using this solution, please be aware of this limitation.
Of course, this is not needed always when you have an apostrophe (').
Normally (when you don't have the calculations in your note/label) nothing is needed.
In your specific case, in your note you get the info from the instance where the syntax has other single quotes and in this case you break the "syntax".
You are using html (the element) and I replaced the (') with the corresponding html value.
I'm not suggesting anyone to do a full replacement in their file