Puzzling behaviour with stamp

I have a Stamp to get imported references (from Bookends) in the format I prefer. What I do not understand is that when I apply the stamp the first time, the Note’s name is changed to the reference title (e.g. Letter to John Smith). If I apply the same stamp a second time, it changes the title to what I intended, namely date and reference title (e.g. 2020-10-20 - Letter to John Smith). I am puzzled about why I have to apply the stamp twice to make it work properly. The contents of the stamp in question is:

$Name = $PublicationYear + " - " + $ArticleTitle;$Subtitle = $Authors;$Width = 12;$Height = 2;if($Authors.at(0).beginsWith(“Smith”)){$Color=#FFFFE9;}else{$Color=;};$KeyAttributes=“Authors;ArticleTitle;BookTitle;Journal;PublicationYear;RefKeywords;Abstract;URL”;

It is not a big deal, as applying the stamp twice is pretty easy, but I cannot understand why it should do this. This seems to happen fairly consistently. I drop the references in using Option-Cmnd-drag.

OK, assuming the quotes are as altered by the forum, I read the action as (I’ve added line breaks just to make it clearly to review)

$Name = $PublicationYear + " - " + $ArticleTitle;
$Subtitle = $Authors;
$Width = 12;
$Height = 2;
if($Authors.at(0).beginsWith("Smith")){
   $Color=#FFFFE9;
}else{
   $Color=;
};
$KeyAttributes="Authors;ArticleTitle;BookTitle;Journal;PublicationYear;RefKeywords;Abstract;URL";

This works first time for me in v8.8.0 (on a note dragged from Bookends v.13.x). I normally have just the Year in the Bookends ‘Date’ filed (which populates $PublicationYear) but I altered a record to your yyyy-mm-dd and the import and them stamp still worked just fine first time.

So, my best guess is there may be non-printing characters in the source data from your Bookends which confuses the action. Could you upload a small TBX with some imported references you know react this way and with your stamp installed? This will allow us to have consistent test data.

Will do, but may not be able to do this for a day or two.

Thanks.

1 Like

No problem, thanks for the update.

I waited to respond because I decided to upgrade my Mac to a new model running Catalina, and since doing that the puzzling behaviour seems to have stopped, most of the time, if not completely, hence my silence. No idea what I could have done in transferring everything to the new machine so I will just get on with trying to use TB to sort out some material. Thanks for the offer to help.

1 Like