Tinderbox Forum

How can I create a Stamp that replaces part of a string?

I have several notes in my documents that are linked to Dropbox, and I would like to move the links from Dropbox’s to pCloud’s.
So I tried to make some stamps like the one below, but the string text just all disappears and cannot be replaced.

$URL=$URL.replace("dropbox","pCloud");

$Fill=$Fill.replace("dropbox","pCloud");

The sample above is provisional; for example, if the ”dropbox” above is replaced with ”pCloud”, it will be the correct URL for the new location.

How can I create a Stamp that replaces part of a string in a Fill or URL? :upside_down_face:

Odd, a stamp with this code works for me:

My startling point was these values:

Applying the stamp above I get:

Here is the test doc (using v9.3.0): stamp-test.tbx (79.4 KB)

In the doc, ‘Source’ is there to copy from to make test notes. Note ‘Test’ shows the result of my trial above. Select ‘Test2’ (copied from ‘Source’) and run the ‘Swap domain’ stamp either from the Inspector or the Stamps menu.

Having established it works there but not in your test doc, I’d look for other things that might be acting on those attributes (agents, rules, etc.)

1 Like

Hi, Mark
That’s so sweet!!! Thanks for everytime. amazing!
:heart_eyes: :heart_eyes: :heart_eyes: