Spotlight Comments with Folder Containing Names

I have tried to update spotlight comments with the Folder Containing Names field. The resulting spotlight comment is null where that field should be. Is there something else I need to do?
simply useful mac software
https://www.noodlesoft.com/forums/
Mr_Noodle wrote:Can you post your rule? Can't say without more details.
If (all) are met for (file being matched)
Kind is Image
If (all) are met for (enclosing folder)
Name matches (•name)
Then
Rename (date created)(•name)SL
...