web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Syntax error

(0) ShareShare
ReportReport
Posted on by 69

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")});

Categories:
I have the same question (0)
  • Flejoyeux Profile Picture
    69 on at

    Flejoyeux_0-1681895209061.png

    A screen capture of the error displayed

    I seems that the StrTexte name is not automatically recognized as a  local variable as it should

     

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    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.


  • Flejoyeux Profile Picture
    69 on at

    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)

  • Verified answer
    NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    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.

  • RobHajj98 Profile Picture
    496 on at

    Hey @Flejoyeux ,

    Roberto_el_Hajj_0-1681909603996.png

    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.

  • Flejoyeux Profile Picture
    69 on at

    Hi

    The idea is to use the function with any string

    Declaring the Variable on the OnStart properties works

  • Flejoyeux Profile Picture
    69 on at

    Another problem Fixed : in a French development Environment, Commands are to be separated by a double semicolumn ";;"  !

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard