Idea - Extend the Substitute function to support the replacement of multiple words

It's difficult to build formula that replaces multiple words. Here's an idea to simplify this task by extending the Substitute function.

For text manipulation purposes, one of the core functions is Substitute. This function replaces words or characters from a given input string and the basic usage of the function looks like this:

Substitute(inputString, oldtext, newtext)
Here's a link to the official documentation:

When manipulating text in Power Apps, there's often the need to replace multiple words at the same time. There's no simple way to do this and app builders often resort to nesting multiple calls to Substitute like so:

// With this example, "Mon 1st March 2022" is the input text, 
// which typically would a dynamic value from a data source

"Mon 1st March 2022",

This type of structure is difficult to write and maintain. Therefore, I suggest that it would be very helpful if the Substitute function could be enhanced to support multiple replacements. The usage would look like this:

Substitute("Mon 1st March 2022",

I've added this to the ideas forum and you can vote for this feature through the link below if you also think this enhancement would be useful.

Related posts