I suggest the following calculation. It won't produce exactly what you ask for as the phrasing is simpler, but it should be acceptable:
This assumes that you have a single field formatted with these check boxes. I'll call the field "YourCheckBoxField".
Define your calculation to be:
"The patient we contacted had the following symptoms: " & Substitute ( YourCheckBoxField ; ¶ ; ", " ) & ". please follow the required instruction for treatment...."
Using your example, this will produce:
the patient we contacted had the following symptoms: tired, swollen feet. please follow the required instruction for treatment....
Leaving out the pronouns and verbs makes for a much less complex expression.
Thanks for the reply, however this was not entirely what I am looking for.
I'll try to explain it further:
Field 1 = checkbox [ ] Doctor
Field 2 = checkbox [ ] Caregiver
Field 3= Checkbox [ ] Heart attack
Field 4 = checkbox [ ] swollen feet
If I would check Doctor (which value will turn to 1) and check heart attack, which turns its value also to 1, i would like to have a 'comments field' where the following text is generated:
For your patient the : 'doctor was contacted' to report the problem of: "a Heart attack"
I can do this in a layout where we could use the merge fields but i would put more logic into the reporting based on various calculations (if some fields are empty insert a certain text string in front etc...
I am able to enter text in a field if another field has value 1, but I cannot add a second text string to that first text string to complete the sentence.
I hope this makes sense?
thanks in advance!
If you can get the results you wanted with merge fields, then the calculation field to produce the same is quite similar.
"some text <<FIeld1>> some more text <<Field2>>
and this calculation:
"some text " & field1 & " some more text " & field2
will produce the same result.