Great! The reason I use a variable is
vPath is once the code has run, vPath is not kept. Before the
var var operator we would need to use an attribute to store the creation path, e.g.
$MyString = "Quotes from " + $Name;
$MyString =; // clean out stored value
That makes it all the more logical-seeming that you might—as in your opening question—build the path string in the
create() input argument.
Don’t forget that if
create() is successful it returns the $Path of the new note, which you can capture in an attribute or variable and then use it to do something with that note. Here, we us a second variable to hold the path and use it to set the $Badge of the new note:
Code for the above stamp:
var vPath = "Quotes from " + $Name;
var vNotePath = create(vPath);
$Badge(vNotePath) = "quote";