OriginalPostID-268847
Discussion posts and replies are publicly visible
You can use this for dynamic number of replacements. Create rule inputs accordingly. subString and replacement are text array inputs.
Example: Inputs:ri!sentence: Quick brown fox jumps over the lazy dog
ri!subString: {"brown","fox","dog"}
ri!replacement: {"black","dog","sheep"}
if( count(ri!subString) <> count(ri!replacement), "Invalid replacement configuration. Please ensure that replacements are correctly specified.", reduce( fn!substitute, ri!sentence, merge(ri!subString, ri!replacement) ) )
This is a 7-year-old post..!!
And it uses a!localVariables without any local variables ...
I experimented locally, and when making it dynamic with rule inputs, I inadvertently left in a!localvariables. Thank you for bringing that to my attention; I'll update the final response accordingly.