In board view use Description field toggle to show if entity has a description (like Trello)

Here is the updated code and instructions for this automation + script based workaround to show if a entity / card has a Description:

Setup

  1. Add a single select field named: Has Description
  2. To this field add a single option with the value: ...
  3. Set the icon of this field to one of the :memo:“write” or :page_with_curl:“paper” emojis
  4. Create an automation rule When > On Schedule, every one hour Then run script:
const fibery = context.getService('fibery');
for (const entity of args.currentEntities) {
    const description = await fibery.getDocumentContent(entity.Description.Secret);
    const hasDescription = entity['Has Description'].Name
    if (description && !hasDescription) {
        // set Has Description field if not already set 
        await fibery.updateEntity(entity.type, entity.id, {
            'Has Description': "...",
        });
    } else if (!description && hasDescription) {
        // clear Has Description field if no description
        await fibery.updateEntity(entity.type, entity.id, {
            'Has Description': null,
        });
    }
}

How it works

Note: When it becomes possible to trigger on rich-text changes, you might be able to do the entire workaround automation without using the script.

Edit: If you want an icon to show for fields other than Description, the process is much simpler and can be done without using scripts. See this example here:

1 Like