Clarity PPM

Expand all | Collapse all

How to clear attribute value using XOG API?

  • 1.  How to clear attribute value using XOG API?

    Posted 03-22-2019 12:51 AM

    For Example value of an integer field named 'Alignment' needs to update to blank value from for a integer value.

     

    if the alignment is set alignment = "" as follows :

    <Project projectID="14" name="Kovair Project 1mn Mod" alignment="">

    Following error is thrown : 

    attribute "alignment" has a bad value: "" does not satisfy the "integer" type

     

    if the alignment is not included as follows :

    <Project projectID="14" name="Kovair Project 1mn Mod">

    the attribute is ignored and not getting updated.

     

    Is there any extra attribute to be added in the post xml, to achieve the same?



  • 2.  Re: How to clear attribute value using XOG API?

    Posted 03-22-2019 03:01 AM

    Hi kovairsoftware ,

     

    Its seems difficult to achieve in xog, however you can use REST api if you are using project update, for clearing any value you can explicitly set values to null as shown below: 

    "chargeCode": null

     

    Note:  I have not tried this for number field however i have a hunch that it will work for number as well.

     

    Regards,

    Prashank Singh



  • 3.  Re: How to clear attribute value using XOG API?

    Posted 03-22-2019 04:20 AM

    I agree, in earlier threads on clearing a value with XOG the consensus seems to be that XOG can only write a value (other than null) with the exception of using the argument completed = true eg with OBS uni associations and rights.



  • 4.  Re: How to clear attribute value using XOG API?

    Posted 03-26-2019 08:05 PM

    With the condition that REST api is currently not supported.