AnsweredAssumed Answered

Document Cache Lookup in Map only using first piece of information

Question asked by bbajwa802798 on Mar 29, 2017
Latest reply on Mar 30, 2017 by bbajwa802798

In my map function, I am running a document cache lookup. The document that is returned has the following information:

<services type="array">
<service>
<name>
<first-name>Tray</first-name>
<middle-name>L</middle-name>
<last-name>Quail</last-name>
</name>
<person-id>10000000049</person-id>
<calculated-age type="integer">15</calculated-age>
<birth-date>2001-07-07</birth-date>
<focus-child type="boolean">true</focus-child>
<service-name>Individual Psychotherapy</service-name>
<service-category>Mental Health Services</service-category>
<service-type>Treatment</service-type>
<service-start-date>2017-03-15T00:00:00.000Z</service-start-date>
<service-end-date>2017-09-15T00:00:00.000Z</service-end-date>
<frequency-of-service>4.0 per month</frequency-of-service>
<provider>
<name>Wayne County Mental Health</name>
<address>620 W Main Street, Bluffton, IN 46714</address>
<phone-number>(222) 345-6678</phone-number>
</provider>
</service>
<service>
<name>
<first-name>Tray</first-name>
<middle-name>L</middle-name>
<last-name>Quail</last-name>
</name>
<person-id>10000000049</person-id>
<calculated-age type="integer">15</calculated-age>
<birth-date>2001-07-07</birth-date>
<focus-child type="boolean">true</focus-child>
<service-name>Transpor PlcFam 0-200 IV-E Allowed</service-name>
<service-category>Transportation</service-category>
<service-type>Foster Care Transportation</service-type>
<service-start-date>2017-03-13T00:00:00.000Z</service-start-date>
<service-end-date>2017-03-14T00:00:00.000Z</service-end-date>
<frequency-of-service>200.0 per once</frequency-of-service>
<provider>
<name>Tim's Transport, Inc</name>
<address>5562 Owl Street, Bluffington, IN 46714</address>
<phone-number>(222) 555-7777</phone-number>
</provider>
</service>
<service>
<name>
<first-name>Amy</first-name>
<middle-name/>
<last-name>Quail</last-name>
</name>
<person-id>10000000050</person-id>
<calculated-age type="integer">26</calculated-age>
<birth-date>1990-09-29</birth-date>
<focus-child type="boolean">false</focus-child>
<service-name>Drug Testing UA and Hair Follicle</service-name>
<service-category>Medical</service-category>
<service-type>Drug Testing</service-type>
<service-start-date>2017-03-01T00:00:00.000Z</service-start-date>
<service-end-date>2017-03-01T00:00:00.000Z</service-end-date>
<frequency-of-service>350.0 per once</frequency-of-service>
<provider>
<name>Hawk Lake Medical</name>
<address>99 Hawk Lake Ln, Bluffington, IN</address>
<phone-number/>
</provider>
</service>
</services>

Notice how there are two <service>'s in the XML.

 

When I map this information in a Map Shape, it only assigns the first instance of <service> and not the rest of them. 

 

Above is what I am mapping to. In the resulting document I want to see two instances of <service> but I only get the first instance.

 

I get:

But I should get back two <services> Data </services>. In the profile for the resulting document, I have <services> set to be unbounded as the max. I also have <service> in the document profile set as unbounded as the max.

 

Does anyone know how to fix this?

Outcomes