AnsweredAssumed Answered

Loading Allocations in other work

Question asked by TiagoAb on Mar 20, 2015
Latest reply on Mar 23, 2015 by Dave



I'm currently developing a gel script that has the function of loading allocations for specific other work investments.


The information was passed via excel, that cotains the resource id, other work id, and the respective allocation percentages for each month that needs to be loaded, for example;


OtherWorkID      ResourceID     0.05      0.05      0.50      0.50      0.06      0.07


Where "allocmonth1" = 0.05

and so forth....


For each of the allocation values i hardcode it with the correspondent date for example;


<core: set value="2015-04-01T00:00:00" var="startmonth1"/>

<core: set value="2015-05-01T00:00:00" var="finishmonth1"/>


and so on....


Here is a sample of my script;


<gel:set asString="true" select="$auth/soapenv:Envelope/soapenv:Body/xog:SessionID/text()" var="sessionID"/>

            <gel:parse var="resourceNode">

            <NikuDataBus xmlns:xsi="" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_otherInvestment.xsd">

              <Header action="write" externalSource="NIKU" objectType="otherInvestment" version=""/>


                  <OtherInvestment name="${nameOther}" objectID="${v_name}">


                      <Resource availFrom="${startdatemonth}" availTo="${finishdatemonth}" bookingStatus="5" defaultAllocation="0" openForTimeEntry="true" resourceID="${v_resource}">


                              <Segment  start="${startmonth1}" finish="${finishmonth1}" sum="${allocmonth1}"/>                         









                        <Task start="${startdatemonth}" outlineLevel="1" finish="${finishdatemonth}" internalTaskID="-1" milestone="false" name="${v_name}" taskID="~rmw">


                                <TaskLabor resourceID="${v_resource}" />









startdatemonth and finishdatemonth are also hardcoded with values that correspond to the start and finish of the investment itself.

Although it works and the allocations are loaded into clarity correctly, it deletes the previous allocations prior to the new segments that i load.

Is there any way to correct this? I'm not sure if XOG is supposed to do this by default, or that its Clarity automatically assumes that previous periods are considered 0% allocation.

Thank you!