Clarity

 View Only
  • 1.  Insert a new record into a multi-valued lookup field via gel script

    Posted Apr 24, 2015 10:41 AM

    I'm having trouble trying to insert a new project id using the <gel:set> statement

     

    The file structure of the xog output file looks like this, and I parsed this output below.

     

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

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

      <customObjectInstances objectCode="prj_inst_rights">

      <instance instanceCode="00000063" objectCode="prj_inst_rights">

      <CustomInformation>

      <ColumnValue name="prj">

      <Value>5141770</Value>

      <Value>5225745</Value>

      <Value>5226744</Value>

      <Value>5272757</Value>

      </ColumnValue>

      <ColumnValue name="assign">false</ColumnValue>

      <ColumnValue name="res">S5379</ColumnValue>

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

      <ColumnValue name="name">00000063</ColumnValue>

      <ColumnValue name="code">00000063</ColumnValue>

      <ColumnValue name="page_layout">odf.prj_inst_rightsFrame</ColumnValue>

      <ColumnValue name="odf_period_start"/>

      <ColumnValue name="odf_period_end"/>

      </CustomInformation>

      <OBSAssocs complete="false"/>

      </instance>

      </customObjectInstances>

     

     

    I parse the new value I would like to enter:

     

    <gel:parse var="insert_right">

                      <Value>${prj_id}</Value>

    </gel:parse>

     

    Here is my insert statement:

     

    <gel:set insert="true" select="$update_record/NikuDataBus/customObjectInstances/instance/CustomInformation/ColumnValue[@name='prj']/Value"var="insert_right"/>

     

    Any help or comments about what I'm doing wrong? Please let me know! Thanks!



  • 2.  Re: Insert a new record into a multi-valued lookup field via gel script
    Best Answer

    Posted Apr 28, 2015 12:53 PM

    I got this to work. So I thought I would post my solution...

     

    <gel:set insert="true" select="$update_record//customObjectInstances/instance/CustomInformation/ColumnValue[@name='prj']" value="${insert_right}"/>