Skip to main content

I have this long string of merges that I’m using in an ‘update field on row’ action:

{{Nurse_s_Notes__c}} {{#U_S_Performed__c}}U/S Performed. GA {{Gestational_Age_by_U_S_Weeks__c}}w{{Gestational_Age_by_U_S_Days__c}}d. {{#Fetal_number__c}}Pregnancy confirmed. FHR  {{Baby_1_FHR__c}}{{#Baby_2_FHR__c}}, {{Baby_2_FHR__c}}{{#Baby_3_FHR__c}}, {{Baby_3_FHR__c}}{{#Baby_4_FHR__c}}, {{Baby_4_FHR__c}}{{/Baby_4_FHR__c}}{{/Baby_3_FHR__c}}{{/Baby_2_FHR__c}}{{/Baby_1_FHR__c}}{{/Fetal_number__c}}{{^Fetal_number__c}}Unable to Confirm.{{/Fetal_number__c}} EDD {{Estimated_Due_Date_by_U_S__c}}{{/U_S_Performed__c}}

I get the following error:
Uncaught Error: Unclosed section “Fetal_number__c” at 798

The relevant fields are bold. Is there just too much between the first open and close?

I think the error is actually that {{/Baby_1_FHR__c}} was never opened — this may be throwing things off. Maybe change {{Baby_1_FHR__c}} to {{#Baby_1_FHR__c}}and see if that fixes it.



I think you were missing a starting tag for Baby 1, which I’ve added in bold. You are also crossing the merge syntax line from “helpful and intuitive” into “impossibly complicated”… 🙂

{{Nurse_s_Notes__c}} {{#U_S_Performed__c}}U/S Performed. GA {{Gestational_Age_by_U_S_Weeks__c}}w{{Gestational_Age_by_U_S_Days__c}}d.{{#Fetal_number__c}}Pregnancy confirmed. FHR  {{#Baby_1_FHR__c}}{{Baby_1_FHR__c}}{{#Baby_2_FHR__c}}, {{Baby_2_FHR__c}}{{#Baby_3_FHR__c}}, {{Baby_3_FHR__c}}{{#Baby_4_FHR__c}}, {{Baby_4_FHR__c}}{{/Baby_4_FHR__c}}{{/Baby_3_FHR__c}}{{/Baby_2_FHR__c}}{{/Baby_1_FHR__c}}{{/Fetal_number__c}}{{^Fetal_number__c}}Unable to Confirm.{{/Fetal_number__c}} EDD {{Estimated_Due_Date_by_U_S__c}}{{/U_S_Performed__c}}


I arrived at the same conclusion but went ahead a created a custom object to test the theory:


{{helios__Nurse_s_Notes__c}}
{{#helios__U_S_Performed__c}}
U/S Performed. GA {{helios__Gestational_Age_by_U_S_Weeks__c}}w{{helios__Gestational_Age_by_U_S_Days__c}}d. {{#helios__Fetal_number__c}}Pregnancy confirmed. FHR  {{#helios__Baby_1_FHR__c}}{{#helios__Baby_2_FHR__c}}, {{helios__Baby_2_FHR__c}}{{#helios__Baby_3_FHR__c}}, {{helios__Baby_3_FHR__c}}{{#helios__Baby_4_FHR__c}}, {{helios__Baby_4_FHR__c}}{{/helios__Baby_4_FHR__c}}{{/helios__Baby_3_FHR__c}}{{/helios__Baby_2_FHR__c}}{{/helios__Baby_1_FHR__c}}{{/helios__Fetal_number__c}}{{^helios__Fetal_number__c}}Unable to Confirm.{{/helios__Fetal_number__c}} EDD {{helios__Estimated_Due_Date_by_U_S__c}}
{{/helios__U_S_Performed__c}}


Yup, works.


Thanks, gentlemen! You all rock.

And yes… definitely stretching into the ‘impossibly complicate’ territory.


Irvin gets this week’s prize for “going beyond the call of duty!”   Thanks so much.  


Reply