Replace Text function

Replace Text function

  

Hello

I would like to know if there is a  text function that allow me to change a caracter (in a position) by other caracter


Example:   I Have  "22120" and I want to change the 4th 2 by "4". To Get "22140"


I know the Replace function is a built-in function, but is not what i pretend



TIA



Hi Alberto.

You can do this concatenating two substr plus the text you want to replace, or try to use this component: https://www.outsystems.com/forge/component/2007/text-and-html-processing/

Never saw a "replace" by position as built in function (don't saying it does not exists in an extension that I don't know...)

There are also other text libraries in Forge, maybe one has what you want.

Cheers.

Thanks Eduardo, but the component that you sugest is a litle to much for the circunstance! :) 


I think that I will first sugestions ... concatenanting substr

By the way the Microsoft Power Query have...


Replaces length characters in a text value starting at a zero-based offset with the new text value.


Text.ReplaceRange(text as nullable text, offset as number, length as number, newText as text) as nullable text  


Thanks again