Here is the updated code and instructions for this automation + script based workaround to show if a entity / card has a Description:
Setup
- Add a single select field named:
Has Description
- To this field add a single option with the value:
...
- Set the icon of this field to one of the
“write” or
“paper” emojis
- 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: