Tinderbox Forum

Having trouble with using a Stamp to link from one note to another

I’ve been trying to create a stamp/rule to help link a number of notes, aka products, to a single note called “Email Aliasing (Temporary Mailbox)”, aka a feature. The products have a “Product” prototype, and s $Features attribute that contains “Temporary Mailbox.”

I’ve used the following:

if($Features.contains=“Temporary Mailbox”)linkFrom(“Temporary Mailbox”),“Feature”)

In a test file with three notes the above works. But in my larger real file it is not working. I’m not sure what I’m doing wrong. Does anyone have any ideas?


I’m not following the logic of your stamp. (Which, aside, is an ill-formed conditional – but that’s not the point).

If you know the name of the destination, and If you want to link this or these notes to that note, with a stamp, or an agent, why not use:

linkTo("/Email Aliasing (Temporary Mailbox)","agree");

or simply

linkTo("/Email Aliasing (Temporary Mailbox)");

ignoring the link type?

The syntax for a conditional statement is:

if(…expression) { …do this… } else { …do that… }

As @PaulWalters has pointed out, this is forcing Tinderbox to make a few guesses. I think—just so we are all on the same page (line breaks in code just for clarity):

if($Features.contains="Temporary Mailbox"){
   linkFrom("Temporary Mailbox",“Feature”);

But If this works (Tinderbox guessing correctly!) in your test file, then the question becomes what in the main doc is different.

Are you deploying the code the same way in both files? As you are using aliases at one/both ends are the links being created, but not between the object you assume would be linked. Don’t forget linkToOriginal() or linkFromOriginal() in case that helps.

:pray::pray::pray: Eureka, that works!. You’re right, my syntax was a mess.

I updated the above to this (I was missing a “( )” )

if($Features.contains("Temporary Mailbox")){
     linkFromOriginal("Email Aliasing (Temporary Mailbox)","Feature");

I ran the query in the attribute browser and ran this as an action. Perfection. :slight_smile:

Actually, I wrote, “Benefit” instead of “Feature” in the first try. I successfully used unlinkFromOriginal() to reverse the error and then did it correctly the second time. Worked like a charm.

So grateful, thank you!

1 Like