Tinderbox Forum

Resetting(Remove) Basic Links? Resetting(Remove) Text Links with a stamp(s)?

How would I go about creating stamp(s) to reset my Basic Links to and from a note?
To extend it further, creating a stamp to reset my Text Links to and from a note?

Use case, let’s say I have an older note on a concept I was trying to develop and over time, I gain greater insight and decide my initial map was incorrect and I want to start over.

Is there a way I can select all my notes (or selected notes) and reset my links: Basic and Text?

Thanks in advance

I’m not sure of what you imply by ‘reset’. But a few pointers:

So you can delete all in- or out-bound links for both basic and text links. For creating links you can only create in- or -out-bound basic links.

Thanks Mark, by resetting I am meaning I want to delete all my basic and text links to and from the selected notes.

So thank you for the suggestion:

I am still a bit unclear how to use this to delete all basic and text links if I select a number of notes and want to use a stamp.

How would I use the above in a stamp? Generally, if I want to reset $Color for example, I use $Color=; in a stamp. Not sure how I would use the unlinkTo and unlinkFrom in the stamp.

I am certain it is super easy, but I can’t seem to put what I want to do into a stamp action code.

Thanks in advance,

When you stamp a note, the stamp action runs on each selected note, once. The same action occurs whether your stamp one note or many. So the number of items selected is a diversion.

By “all basic and text links”, I assume you mean outbound links form the selected note to other note(s). Hint, read the first paragraph of the linked articles above as they describe this aspect explicitly. If not sure, please quote the text that is not clear. Spoiler (click to reveal answer): see unlinkTo().

Next, having selected your method, you need to define a group designator. Look at the list on the latter page. Which of the listed terms do you think would define all the notes linked from this one? You can click any item for a full description. Spoiler (click to reveal answer): did you try all?.

Lastly, the linking operators tend to have an optional link type input that allows your to filter for particular link type(s) only. Omitting this argument implies all link types, so you don’t need this argument in your stamp. Testing, I discovered a bug! You need to use `"*" as the second argument (N.B. docs not yet updated).

I’ve constructed the above answer in this way as the answers are there, but you will often have to follow links if you don’t already understand the link types. In this case, starting from the aTbRef action code list don’t think you’d need to read many aTbRef pages.

It simply isn’t feasible to answer every question as a worked example (and obvious questions are subjective).

Hopefully, I’ve guided you to an answer in a manner that will help you next time with a similar but different occasion. If not, and there’s some ambiguity I’ve completely missed, do say. The latter is something that would need addressing at source.

Suggested stamp code: spoiler (click to reveal answer): unlinkTo(all);.