Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete an insight object attribute value

Janos Laki March 26, 2019

Can someone suggest how I can use "deleteObjectAttributeBean()" in groovy scripting in order to update/delete an insight object attribute value to null?

1 answer

1 accepted

3 votes
Answer accepted
Yinon Negev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 28, 2019

Hi Janos.

      As you rightfully suggested in your support Request with us, I am posting the answer here for the benefit of the community :)

In order to clear an Attribute Value, you have to delete the ObjectAttributeValueBean.

Here is an excerpt of a script doing just that:
// Update End Date obTriage = objectFacade.loadObjectAttributeBean(insightObject.getId(), "End Date").createMutable()
value = obTriage.getObjectAttributeValueBeans()
value.clear() try {
obTriage = objectFacade.deleteObjectAttributeBean(obTriage.id);
} catch (Exception vie)

{ log.error("Could not update object attribute due to validation exception:" + vie.getMessage()); }

}

Kind regards,

Yinon

Team Riada

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events