# Workaround boast: Entity Types

**URL:** <https://community.fibery.io/t/workaround-boast-entity-types/4014>\
**Category:** Fibery Showcase\
**Created:** [February 17, 2023, 10:05pm UTC](https://community.fibery.io/t/workaround-boast-entity-types/4014 "2023-02-17T22:05:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aprotasenya](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/aprotasenya/32/1221_2.png) [@aprotasenya](https://community.fibery.io/u/aprotasenya)\
**Post date:** [February 17, 2023, 10:05pm UTC](https://community.fibery.io/t/workaround-boast-entity-types/4014/1 "2023-02-17T22:05:45Z")

</div>

## TL;DR

Just wanted to share an easy workaround for when you need the name of the database/type available on the UI level:

1. create a text field;
2. populate that field with “entity.type” via automated script.

I didn’t want the space name in it, so I’ve truncated it. My script looks like this:

```auto
const fibery = context.getService('fibery');

for (const entity of args.currentEntities) {
    await fibery.updateEntity(entity.type, entity.id, {
        'Entity Type': entity.type.substring(entity.type.lastIndexOf("/") + 1, entity.type.length)
    });
}

```

## Use case

So I have a lot of videogame-y stuff as databases in fibery: enemies, weapons, skills, etc. And I also have factions as database, and all of those can relate to 1 faction (so that’s a many-to-one relation).

I wanted to make a board where the factions would be the columns, and the cards would be all of that stuff (6 databases total), and that worked easy. But the contents of a column were all mixed up: 2 enemies, a weapon, a skill, an enemy, 3 weapons and so on. I wanted to separate the rows on the entity’s database or at least sort by it, so that I’d get some order.

So I did the workaround from above – and was able to sort by the text field! Yaaay! 🙌

 ![Знімок екрана 2023-02-17 о 23.39.51](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/e/eac8ab9a7a7066ce5edde747726006be6860d493.png)  
 ![Знімок екрана 2023-02-17 о 23.40.54](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/9/99d5f1779263f71fefb5bd64738937b6e9aa2644.png)

Hope this might save someone some time. 😊
