AnsweredAssumed Answered

Duplicate Data When Creating Sub-Object Instances via XOG

Question asked by Owen_R on Feb 2, 2011
Latest reply on Feb 3, 2011 by Owen_R
i have a GEL script in which I read some data from a query in order to create new instances of a custom sub-object. Code below is an example of what Clarity generates in the script via the Parse tag, with 3 distinct resource/task combinations copied from other sub object instances, as shown in the Notes field.
<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">
    <Header action="write" externalSource="NIKU"
        objectType="customObjectInstance" overrideAutoNumbering="false" version="12.0.6.5471"/>
    <customObjectInstances objectCode="axa_nrr">
        <instance instanceCode="-1" objectCode="axa_nrr"
            parentInstanceCode="00001" parentObjectCode="project">
            <CustomInformation>
                <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                <ColumnValue name="odf_cncrt_parent_id">5013178</ColumnValue>
                <ColumnValue name="odf_parent_id">5013178</ColumnValue>
                <ColumnValue name="code">""</ColumnValue>
                <ColumnValue name="actuals_date">2011-02-02</ColumnValue>
                <ColumnValue name="actual_quantity">0</ColumnValue>
                <ColumnValue name="task_id2">5324131</ColumnValue>
                <ColumnValue name="name">"NRR"</ColumnValue>
                <ColumnValue name="resource_id2">5008860</ColumnValue>
                <ColumnValue name="status">1</ColumnValue>
                <ColumnValue name="notes">2011-02-02 Copied from 00001 - 0146</ColumnValue>
            </CustomInformation>
        </instance>
        <instance instanceCode="-1" objectCode="axa_nrr"
            parentInstanceCode="00001" parentObjectCode="project">
            <CustomInformation>
                <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                <ColumnValue name="odf_cncrt_parent_id">5013178</ColumnValue>
                <ColumnValue name="odf_parent_id">5013178</ColumnValue>
                <ColumnValue name="code">""</ColumnValue>
                <ColumnValue name="actuals_date">2011-02-02</ColumnValue>
                <ColumnValue name="actual_quantity">0</ColumnValue>
                <ColumnValue name="task_id2">5328821</ColumnValue>
                <ColumnValue name="name">"NRR"</ColumnValue>
                <ColumnValue name="resource_id2">5008859</ColumnValue>
                <ColumnValue name="status">1</ColumnValue>
                <ColumnValue name="notes">2011-02-02 Copied from 00001 - 0169</ColumnValue>
            </CustomInformation>
        </instance>
        <instance instanceCode="-1" objectCode="axa_nrr"
            parentInstanceCode="00001" parentObjectCode="project">
            <CustomInformation>
                <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
                <ColumnValue name="odf_cncrt_parent_id">5013178</ColumnValue>
                <ColumnValue name="odf_parent_id">5013178</ColumnValue>
                <ColumnValue name="code">""</ColumnValue>
                <ColumnValue name="actuals_date">2011-02-02</ColumnValue>
                <ColumnValue name="actual_quantity">0</ColumnValue>
                <ColumnValue name="task_id2">5328889</ColumnValue>
                <ColumnValue name="name">"NRR"</ColumnValue>
                <ColumnValue name="resource_id2">5021885</ColumnValue>
                <ColumnValue name="status">1</ColumnValue>
                <ColumnValue name="notes">2011-02-02 Copied from 00001 - 0170</ColumnValue>
            </CustomInformation>
        </instance>
    </customObjectInstances>
</NikuDataBus>
When the process actually runs the script i get three new entries, as expected, but they all share the information set out in the 3rd instance (copied from 00001 - 0170). What I want is for them to be distinct as above.

The same thing happens if I copy the above XML into the Clarity XOG Client or run via the CMD prompt.

I can only presume I'm overwriting each entry with the data from the last one but I can't see where I'm doing that. Any ideas?

Thanks in advance

Owen

Outcomes