Hi
I am tryng to queue multiple commands in a screen to
- create a collection
- set a function to replace accentuated characters
I found this formula via Bing new conversation search tool (mind comma are replaced by semicolumn beacause french devpt interface)
Trouble is PowerApps keeps telling that it doesn't recognize StrText and so Substitute as an invalid argument
Is there something more to do to make PowerApps accepting the variable StrText ?
Set(MyFunctions; {RemoveFrenchAccents: Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(StrText;"é"; "e");"è"; "e");"ê"; "e");"ë"; "e");"à "; "a");"â"; "a");"ô"; "o");"ù";"u");"û"; "u");"î"; "i");"ç"; "c")});
Another problem Fixed : in a French development Environment, Commands are to be separated by a double semicolumn ";;" !
Hi
The idea is to use the function with any string
Declaring the Variable on the OnStart properties works
Hey @Flejoyeux ,
Set(MyFunctions, {RemoveFrenchAccents: Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute( "vidéo","é", "e"),"è", "e"),"ê", "e"),"ë", "e"),"à ", "a"),"â", "a"),"ô", "o"),"ù","u"),"û", "u"),"î", "i"),"ç", "c")})
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Flejoyeux ,
Apologies, please use below formula in OnStart property of App -
Set(StrText ; "")
You can also use text input control name instead of using a variable - TextInput1.Text in place of variable.
Hi
I plan to use the function to relace all accents from strings coming for a Text Field and a Text Column in order to be able to filter, for example "Video" if it is either entered as "vidéo", "Video", 'video" or "Vidéo" in either of the text field (search box) or the records
Your solution seems to work for the Function declaration but there still an error in the OnVisible parameter of the Screen part wich is generated by the semicolumn at the end of the formula settings
is the syntax to queue command different in a French environnement ?
Set(MyFunctions; {RemoveFrenchAccents: Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(StrText;"é"; "e");"è"; "e");"ê"; "e");"ë"; "e");"à "; "a");"â"; "a");"ô"; "o");"ù";"u");"û"; "u");"î"; "i");"ç"; "c")});
ClearCollect(BoiteaOutils;Documents)
Hi @Flejoyeux ,
Can you please let me what value you are setting in "StrText" variable and where are you adding the formula to set value to "StrText" variable.
You can set StrText OnStart to blank - Set(StrText,"") and try running OnStart function.
A screen capture of the error displayed
I seems that the StrTexte name is not automatically recognized as a local variable as it should
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473