Unable to concatinate fields from xml date file in the AEM form design using Formcalc

Avatar

Avatar

sandeepv3010054

Avatar

sandeepv3010054

sandeepv3010054

21-09-2018

These are fields I want to concatinate using Formcalc script.

itemlabel   -  Part Number

itemvalue  -  1234

XML file:

<My-File>

   <itemlabel>Part Number</itemlabel>

   <itemvalue>1234</itemvalue>

</My-File>

Below is the logic I have maintained, but nothing gets displayed in the PDF Preview:

My-File.mainform.TextField = Concat(My-File.mainform.itemlabel, " : ", My-File.mainform.itemvalue)

Here My-File is the parent tag name in my xml file.

Then I have changed the top hierarchy tag "My-File" to "My_File" (replace "-" with "_")

My_File.mainform.TextField = Concat(My_File.mainform.itemlabel, " : ", My_File.mainform.itemvalue)

I am getting the concatinated value in this condition.

Is there any way to get the concatinated output without changing the "My-File"  tag in xml ?