Smart rule based on incoming links does not work

I have markdown records with embedded links to image records. When I delete a markdown record I want the linked image record to be deleted automatically.

I’m trying to use a smart rule checking for incoming links as a matching criteria. But this does not work. The image record shows up without the symbol for incoming links and a missing value in the list column.

Bildschirmfoto 2021-11-25 um 09.42.20

Smart rules using the corresponding criteria for outgoing links seem to work as expected.

It appears to be a bug.

Does DEVONthink show the obsolete item after selecting the smart rule in the sidebar? By the way, I would suggest to add the condition Kind is Picture to avoid that the smart rule might handle the wrong items.

No, it does not show any items.

So far I can’t reproduce this. Does a rebuild of the database (see File menu) fix this?

No, rebuilding the database does not change anything.

If I change the scope of the rule, so that other record types (other than image) are affected, then it works as expected.
The problem seems to be related to image type.

Could you please post the source of one Markdown document? Thanks!

The markdown looks typically like this:

# Mango-Tango

#Desserts, #Vegetarisch, #Weihnachten 

![Mango-Tango](x-devonthink-item://BFFB249E-EFEB-475A-B5E5-20E35EA06292)

## Zutaten für 6 Portionen 

- 1 weiche Mango ca. 700 g
- ½ EL Zitronensaft  
- 3 EL Puderzucker  
- 3 EL Zitronensaft  
- 75 g getrocknete Mango, grob gehackt  
- 100 g dunkle Schokolade, grob gehackt  
- 250 g Ricotta  
- 2 EL Puderzucker  
- 2 dl Vollrahm  
- 120 g Bärentatzen, grob gehackt  
- 1 dl Orangensaft 

## Zubereitung

### Mangopüree

1. Von der Mango 6 dünne Scheiben wegschneiden, mit Zitronensaft beträufeln, für die Verzierung zugedeckt kühl stellen.
2. Rest in Stücke schneiden, in eine Pfanne geben.
3. Puderzucker daruntermischen. Unter Rühren, ca. 1 Min. köcheln, pürieren, vollständig auskühlen.
4. Zitronensaft daruntermischen.
5. Je 1 EL Mango- und Schokoladestückli für die Verzierung beiseite stellen.
6. Rest zusammen mit der Ricotta unter das Mangopüree mischen.
7. Schlagrahm sorgfältig darunterziehen.  

### Herrichten

Bärentatzen in die Gläsli geben, mit Orangensaft beträufeln. Mangocreme darauf verteilen. Dessert zugedeckt ca. 2 Std. kühl stellen. Mango-Tango mit den beiseite gestellten Mangoscheiben, Mango- und Schokoladestückli verzieren.  

Quelle: [Fooby, 14.12.2015](https://fooby.ch/de/rezepte/9223/mango-tango?startAuto1=0)


OK, I found out that the smart rule ignored the images in the Media group because I excluded the group from search. This is described in the documentation, actually.

The problem here is, that I want the group contents to be affected by smart rules but ignored by search. Would it be technically possible to differentiate these two cases and give more options in the information panel?

It’s not yet possible but might be added to future releases.

Thank you!