Using custom metadata in a smart rule?

I’m trying to set up a smart rule for academic articles in PDFs.

It uses the action Execute Script > External Script > Download Bibliographic Materials

I’d like it to subsequently rename the file so that the existing filename is preceded by the newly created Citation custom metadata item. It seems though that I can only add static text the the filename.

Is this possible?

This should be possible by inserting a placeholder via the contextual menu.

the newly created Citation custom metadata item

What information would be found in this ?

In the (few) examples I tried, this field had Author’s surname & Date.

Will try the context menu and report back, thanks.

Have fun with it, but I would give some real consideration as to adding this to the filename. Overly long filenames can present challenges in UI.

Thanks. Using the contextual menu to add the citation field works but I ran into another issue, around handling blank entries. As far as I can tell I can’t add conditions to a smart rule to e.g. only prepend the Citation & separator if the Citation (added by the previous Execute Script action) is not blank … so I think I will need to script it and use a second Execute Script to do the renaming.

Correct. There is no conditional logic for smart rule actions. Any conditionals would have to be handled in a script.

@jongilizwe What am I missing here? Where are you finding the “Bibliographic Materials” script?

Is this built-in, or what it user-created?

Built-in but external - see the setup described in the first post above.