# History states disappear

**URL:** <https://forums.creativeclouddeveloper.com/t/history-states-disappear/8020>\
**Category:** Photoshop\
**Tags:** bug, uxp\
**Created:** [June 18, 2024, 1:43pm UTC](https://forums.creativeclouddeveloper.com/t/history-states-disappear/8020 "2024-06-18T13:43:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rbrowning](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@rbrowning](https://forums.creativeclouddeveloper.com/u/rbrowning)\
**Post date:** [June 19, 2024, 9:34am UTC](https://forums.creativeclouddeveloper.com/t/history-states-disappear/8020/2 "2024-06-19T09:34:31Z")

</div>

Resolved it.

```auto
    const app = require("photoshop").app;
    const { XMPMeta, XMPConst } = require("uxp").xmp;
    const xml = getDocumentXMP();
    const xmp = new XMPMeta(xml);

    const history = xmp.getProperty(XMPConst.NS_PHOTOSHOP, "History");

```

Then iterate the history.value.

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/history-states-disappear/8020)._
