parse xml using modifiers
CSM/CAM Version : CSM 9.50

Hello all, looking for some help with parsing XML within a onestep..

Here's what I have from external app

<Record contentId="7022235" levelId="17" levelGuid="33fceb9af22e" moduleId="70" parentId="0">
<Record contentId="7025769" levelId="87" levelGuid="3630ea06-c0132" moduleId="82" parentId="0">
<Field id="24052" guid="ed6c3db7" type="4">
<ListValues>
<ListValue id="115199" displayName="TechOps">TechOps</ListValue>
</ListValues>
</Field>
<Field id="444" guid="b0dd630ff9e0" type="6">7025769</Field>
<Field id="448" guid="7c0b" type="1">Training, Engineering &amp; Quality</Field>
</Record>
<Field id="116" guid="686e3type="1">eManuals</Field>
<Field id="11957" guid="2b4089" type="1" />
<Field id="110" guid="74ed6f9" type="6">7022235</Field>
<Field id="4765" guid="effa097" type="8" />
<Field id="11999" guid="50513c5" type="4">
<ListValues>
<ListValue id="53118" displayName="Critical">Critical</ListValue>
</ListValues>
</Field>
<Field id="117" guid="98602ae8" type="1" />
<Field id="12018" guid="12920" type="8" />
<Field id="22081" guid="a687dc73b42" type="8" />
<Field id="24769" guid="660659babb2c3" type="9" />
<Field id="23991" guid="bee832aeef" type="8" />
<Field id="112" guid="7d1dee7f7ce" type="22" xmlConvertedValue="2019-09-20T18:44:04.07Z">9/20/2019 1:44:04 PM</Field>
<Field id="14191" guid="174b9c3f" type="4" />
<Field id="24048" guid="d5c71c7" type="7" />
</Record>

when I step through collection using modifiers of [asXML] [find element collection (field)] I get this:

<Field id="112" guid="7d1dee7f7ce" type="22" xmlConvertedValue="2019-09-20T18:44:04.07Z">9/20/2019 1:44:04 PM</Field>

I would expect to add another modifier to 'get value' but nothing shows only this modifier: goto element index

How do I extract the date from field ID=112? And all the other values from each field ID?

TIA

G

  • Field is not a collection;

    Record is a collection. Use a find element collection on Record. This should return you a list of Fields.

    Take this resulting value and place it into a Step thru collection action. This lets you iterate through each field value.

    Use the 'current item' variable for that collection, and check if the field ID = 112.

    If so, use additional modifiers to find the Date value; you'll be looking for the option to use a string from attribute.