Multiple find and replace on a document or text

TIP:

Since you are only allowed to do only one find and replace on a string at a time. It might be confusing on how to do S&R multiple times to the same text.

You could do this with a WORKFLOW using STATES.

Set state of an element such as:

Workflow item 1
Create a new state using an element in the page for example a button called button1, the state is myText as text
Workflow item 2
Set the state button1 myText = to the text you want to do multiple find and replace
Workflow item 3
Set the state button1 myText = to button1 myText, find and replace (x to y)
Workflow item 4
Set the state button1 myText = to button1 myText, find and replace (a to b)
and so forth…

You could flex-ibilize this by making x and y dynamic etc.

Contribute your own ideas perhaps a better way…

If you are a coder you would do something like this (only placed here for those who come from coding):
_this.Button.ConcatStrng = originalText;
_this.Button.ConcatStrng = this.Button.ConcatStrng.find_and_replace(“x” for “y”);
_this.Button.ConcatStrng = this.Button.ConcatStrng.find_and_replace(“a” for “b”);
_this.ButtonConcatStrng = this.Button.ConcatStrng.find_and_replace(“f” for “g”);

Thanks

10 Likes