@pete31 and @chrillek thank you for your efforts on this.
I’m sorry it wasn’t obvious (and I didn’t explicitly mention) that I was careful to test a case where there was a custom icon on the parent group.
I had seen that before (fantastic work, btw) as well as the related threads (e.g., Can we color the project icon? from 2019), but I’m just not a fan of DEVONthink’s icons, so have been replacing them with custom icons rather than just coloring them.
Ahhhhh … that’s the part that didn’t occur to me [1].
Yes, indeed. If I change the code to
tell application id "DNtp"
set rec to (item 1 of (selection as list))
set parentRec to (item 1 of (parent of rec))
set thumbnail of rec to thumbnail of parentRec
end tell
it works.
@pete31 thank for the code that checks for the existence of the thumbnail above. That will be a good addition to what I’m doing.
[1] I mean, come on. The value can’t be stored in a variable, but the code works if you assign it directly? What? What?