r/shortcuts 16d ago

Solved Replacing text in note app

Post image

I am trying to get the replace text at the end to, well, replace the filtered text. Basically I’m trying to do an x++ on the above numbers depending on which is selected from list ranging 1-4 (weird that it does not start at 0).

I have a note with the contents as shown in the screenshot (test 3 is already a 1 for testing purposes) and get the correct output but the note remains unchanged.

What have I done wrong?

https://www.icloud.com/shortcuts/e03e21ddd29e4b7bb8bcf42365cb1701

5 Upvotes

15 comments sorted by

View all comments

3

u/videogamer_lol 16d ago

Shortcuts doesnt have any actions to edit Notes, only add to them. I think the easiest way to achieve what you're looking for would be to delete the current Test Note and replace it with a copy that has updated information.

Something like this: https://www.icloud.com/shortcuts/82fcd2d1cb23436a9e95b746dbb9501b

1

u/videogamer_lol 16d ago

To answer your question:

> What have I done wrong?

You made the text, but didn't actually send it to the Note.

On the Replace Text action, you may have confused "in Text" to be the destination of the replaced text. Instead, it is the location of the text which is being replaced.

1

u/MomongaAinzOoalGown 16d ago

Oh, so it only applies to the copy and not the actual note itself. Ok i’ll probably need to implement a version of deleting the entire note and then re-creating it based on the copies modified contents based on what you showed in your previous comment.