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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Behavior function in a...
Power Apps
Unanswered

Behavior function in a non-behavior property. You can't use this property to change values elsewhere in the app

(0) ShareShare
ReportReport
Posted on by 9

I create a power apps and need to translate a label text, so i use this formula : MicrosoftTranslatorV2.Translate("en","Bonjour").

but i get this error : Behavior function in a non-behavior property. You can't use this property to change values elsewhere in the app

how to fix it : move the behavior function to a behavior-based property

 

can anyone help me, i am new at power apps.

Capture2.PNG
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at

    Behavior properties are the ones that start with On... like OnSelect or OnVisible. You need to put that function in one of those properties and use it to set a variable. Then you can add the variable where you are using it now to change the text.  Since its a label I suspect you should put it in OnVisible for the screen or the label.

  • ilyass-dahir Profile Picture
    9 on at

    Thanks for the reply.

    How can i put that function in one of those properties and use it to set a variable?

  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at

    Use the following in the appropriate On... property.

    Set(varTranslated,MicrosoftTranslatorV2.Translate("en","Bonjour"))
  • ilyass-dahir Profile Picture
    9 on at

    i use it but the variable still blank (see pictures below)

    3.PNG
    Capture4.PNG
  • ilyass-dahir Profile Picture
    9 on at

    I use it for the Onvisible screen, but the variable is blank 

  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at

    OnVisible may not be the right place to put it since that only fires when the screen is first loaded. It also doesn't work when you are in the preview in the editor.  To test it I recommend putting it in the OnSelect property of a button. Then when you press the button you'll see the variable change.

  • ilyass-dahir Profile Picture
    9 on at

    It works when i put it in OnChange of the dropdown

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard