AnsweredAssumed Answered

Creating subobject rows against a Project using XOG

Question asked by ben.jones on Sep 18, 2013
Latest reply on Sep 20, 2013 by Dave
Note added after this message was creaed:: This is about sub object creation under the investment object (project), it starts off in Idea but moves to project.

I have XOG scripts that create sub object rows against the project and am now trying to do the same in Ideas. I've written a script which runs but doesn't do anything. Can you see what's wrong with below? The script runs in a process directly against the specific Idea.

Subobject = 'ia', subobject of the Idea object.

i've cut off the top of the script........................................


<gel:parse var="v_xml_root">


<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_idea.xsd">


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



<Ideas>



</Ideas>


</NikuDataBus>

</gel:parse>


<gel:setDataSource dbId="niku"/>

<sql:query var="vParentFields" escapeText="false">
select
inv.id,
inv.code,
inv.name,
'X1_'||(to_char(sysdate,'DD_MM_YYYY_HH24_MI_SS'))
from
niku.inv_investments inv
where inv.id=${gel_objectInstanceId}


</sql:query>

<core:forEach items="${vParentFields.rowsByIndex}" var="row">


<core:set var="vs_I_ID">${row[0]}</core:set>


<core:set var="vs_I_CODE">${row[1]}</core:set>


<core:set var="vs_I_NAME">${row[2]}</core:set>


<core:set var="vs_I_UNIQUE">${row[3]}</core:set>


<gel:parse var="Idea">



<Idea name="${vs_I_NAME}" ideaID="${vs_I_CODE}">






<CustomInformation>











<instance instanceCode="${vs_I_UNIQUE}" objectCode="ia"









parentInstanceCode="${vs_I_CODE}" parentObjectCode="idea">










<CustomInformation>











<ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>











<ColumnValue name="name">${vs_I_UNIQUE}</ColumnValue>











<ColumnValue name="code">${vs_I_UNIQUE}</ColumnValue>











<ColumnValue name="odf_parent_id">${vs_I_ID}</ColumnValue>











<ColumnValue name="odf_cncrt_parent_id">${vs_I_ID}</ColumnValue>










</CustomInformation>








</instance>






</CustomInformation>








</Idea>


</gel:parse>





<gel:set select="$v_xml_root/NikuDataBus/Ideas" value="${Idea}" insert="true"/>

</core:forEach>



<gel:out>[XOG]Logging into Clarity XOG at ${XOGURL}.</gel:out>

<gel:log level="INFO" cat.........................................
i've cut off the bottom of the script...

Outcomes