Clarity

  • 1.  Clearing multivalued lookup values with XOG

    Posted Nov 15, 2017 07:08 AM

    Hi,

     

    I need to clean the values of a multivalued lookup attribute in a process, and I don't know how to do it. 

     

    Normally, when you XOG In an attribute with no value it works and leaves the field empty, but this doesn't seem to be the case with multivalued lookups. Is there any tag that will let me do this?

     

    What I'm trying right now is:

     

    <NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd" xmlns:xsd="http://www.niku.com/xog/Object" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Header action="write" externalSource="niku" objectType="customObjectInstance" version="12.0"/>
       <customObjectInstances objectCode="z_propuesta_solucion">
          <instance instanceCode="PS00005053" objectCode="z_propuesta_solucion">
             <CustomInformation>
                <ColumnValue name="z_elements"/>
             </CustomInformation>
          </instance>
       </customObjectInstances>
    </NikuDataBus>

     

    z_elements is the multivalued lookup attribute. The XOG In is updating the custom object instance with no errors, but it is not affecting the field, which still has the values it had previously.

     

    Any insight would be appreciated. Thank you very much.



  • 2.  Re: Clearing multivalued lookup values with XOG

    Posted Nov 15, 2017 08:58 AM

    Same as this:

     

    XOG to remove lookup value

    https://communities.ca.com/message/241831082  

     

    NJ



  • 3.  Re: Clearing multivalued lookup values with XOG

    Posted Nov 15, 2017 09:26 AM

    Hi NJ,

     

    Thanks for your response but I think this doesn't apply to my problem. In that post they need to remove values from a static lookup, what I need is different.

     

    I would like to be able to remove the values of an attribute linked to a dynamic lookup (multivalued) in a custom object instance, I.E, if xogging out the instance we get something like this:

     

      <ColumnValue name="z_elements">
          <Value>IDEA00529</Value>

          <Value>IDEA00537</Value>

          <Value>IDEA00649</Value>
       </ColumnValue>

     

    I would like to leave this attribute empty by updating the instance via XOG.

     

    Thanks!



  • 4.  Re: Clearing multivalued lookup values with XOG

    Posted Nov 16, 2017 03:53 AM

    Hi,

     

    Can anyone give me any insight on this matter? I can't find a solution for the problem... there should way to do this right?

     

    Thanks!



  • 5.  Re: Clearing multivalued lookup values with XOG
    Best Answer

    Broadcom Employee
    Posted Nov 17, 2017 12:50 AM

    Hi,

     

    If you remove first and second Value from below xml,  z_elements multi value lookup in instance will have "IDEA00649" value only. IDEA00529 and IDEA00537 will be removed.

    But you remove all Values in xml, z_elements multi value lookup in instance will not be updated.

     

    <ColumnValue name="z_elements">
          <Value>IDEA00529</Value>

          <Value>IDEA00537</Value>

          <Value>IDEA00649</Value>
    </ColumnValue>

     

    I think that at least one Value tag is required for xog-in instance.

     

    I have following idea. It may not fit your requirement. 

     

    For example, adding extra value like as "Nothing Selected" in lookup.

       Note: You need to assume it is for empty lookup value.

    If you would like to remove all values, you will use below xml.

     

    <ColumnValue name="z_elements">

          <Value>Nothing Selected</Value>
    </ColumnValue>



  • 6.  Re: Clearing multivalued lookup values with XOG

    Posted Nov 20, 2017 03:11 AM

    Hi Shoichi,

     

    I think this is great idea and our best option, a dummy value should work, thanks!