XML Tag grouping in RTF Template to suppress duplicates [message #680646] |
Thu, 28 May 2020 22:24 |
|
techgirl1234
Messages: 1 Registered: May 2020
|
Junior Member |
|
|
My XML Tag generated is as follows-
<P_MONTH>01</P_MONTH>
-<G_1>
<DIVISION>CA Division</DIVISION>
<DISTRICT>CA District</DISTRICT>
<DEPARTMENT>Global Operations</DEPARTMENT>
<DEP_EMPL_COUNT>9</DEP_EMPL_COUNT>
</G_1>
-<G_1>
<DIVISION>CA Division</DIVISION>
<DISTRICT>CA District</DISTRICT>
<DEPARTMENT>Laboratory Services</DEPARTMENT>
<DEP_EMPL_COUNT>11</DEP_EMPL_COUNT>
</G_1>
-<G_1>
<DIVISION>CA Division</DIVISION>
<DISTRICT>CA District</DISTRICT>
<DEPARTMENT>Corporate</DEPARTMENT>
<DEP_EMPL_COUNT>3</DEP_EMPL_COUNT>
</G_1>
-<G_1>
<DIVISION>CA Division</DIVISION>
<DISTRICT>S District</DISTRICT>
<DEPARTMENT>Corporate Administration</DEPARTMENT>
<DEP_EMPL_COUNT>6</DEP_EMPL_COUNT>
</G_1>
-<G_1>
<DIVISION>CA Division</DIVISION>
<DISTRICT>S District</DISTRICT>
<DEPARTMENT>Corporate Technology</DEPARTMENT>
<DEP_EMPL_COUNT>1</DEP_EMPL_COUNT>
</G_1>
When I am using these tag like below in the RTF template-
DIVISION DISTRICT DEPARTMENT COUNT
<?for-each:G_1?> <DIVISION> <DISTRICT> <DEPARTMENT> <COUNT> <?end for-each?>
This is giving an output like -
DIVISION DISTRICT DEPARTMENT COUNT
CA Division CA District Global Operations 9
CA Division CA District Laboratory Services 11
CA Division CA District Corporate 3
CA Division S District Corporate Administration 6
CA Division S District Corporate Technology 1
I want the repeated values in division and district to be suppressed and the output to look like -
DIVISION DISTRICT DEPARTMENT COUNT
CA Division CA District Global Operations 9
Laboratory Services 11
Corporate 3
S District Corporate Administration 6
Corporate Technology 1
How can this be achieved ? I am not being able to use for-each-group properly to group the tags. Can someone please help ?
|
|
|