# How to create a flexible attribute of numeric type

**URL:** <https://discourse.beets.io/t/how-to-create-a-flexible-attribute-of-numeric-type/2088>\
**Category:** Help\
**Created:** [May 9, 2022, 1:41am UTC](https://discourse.beets.io/t/how-to-create-a-flexible-attribute-of-numeric-type/2088 "2022-05-09T01:41:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![halloleo](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@halloleo](https://discourse.beets.io/u/halloleo)\
**Post date:** [May 9, 2022, 1:41am UTC](https://discourse.beets.io/t/how-to-create-a-flexible-attribute-of-numeric-type/2088/1 "2022-05-09T01:41:18Z")

</div>

I have added a flexible attribute `played` to my albums and I am able to query for _fixed_ `played` counts:

```
beet ls played:1 -a 

```

but I have a hard time to query for all songs with `played` attributes of 1 or more.

I guess the reason is this: The _type_ of the flexible attribute is **string** or similar, not **numeric**.

Any way to set it to numeric?

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [May 9, 2022, 11:10am UTC](https://discourse.beets.io/t/how-to-create-a-flexible-attribute-of-numeric-type/2088/2 "2022-05-09T11:10:41Z")

</div>

Yes! That’s what the `types` plugin is designed for:  
[https://beets.readthedocs.io/en/stable/plugins/types.html](https://beets.readthedocs.io/en/stable/plugins/types.html)

---

<div class="post-metadata">

**Author:** ![halloleo](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@halloleo](https://discourse.beets.io/u/halloleo)\
**Post date:** [May 10, 2022, 2:01pm UTC](https://discourse.beets.io/t/how-to-create-a-flexible-attribute-of-numeric-type/2088/3 "2022-05-10T14:01:29Z")

</div>

Super cool. Will check it out. Thanks heaps!
