TL;DR
Just wanted to share an easy workaround for when you need the name of the database/type available on the UI level:
- create a text field;
- 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:
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!
Hope this might save someone some time.