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 / "Indent" where "Contro...
Power Apps
Answered

"Indent" where "Control" is expected

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm trying to "Set(ShowMenu, true)",  on the "OnStart" property of the App (global). "ShowMenu" is already being declared on a local variable using "UpdateContext({ShowMenu: false})" on another screen.

I'm getting this: "Unexpected Characters. The formula contains Indent where Control is expected"

I'm assuming this is because of the scope conflict of these two variables.

I'm doing this because on the start of the App I have a lateral menu that should be hidden but is not.

 

Many thanks

Categories:
I have the same question (0)
  • Verified answer
    JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    From what I can see you have declared ShowMenu as a global variable on Appstart but as a local variable on your other screen.   The UpdateContext function declares the variable as local, which means it can only be used on that screen.

     

    Here is the documentation

     

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-updatecontext

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    That makes sense. It would be pointless to build a variable to be local, but still be accessible globally.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 333 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 86 Super User 2026 Season 1

Last 30 days Overall leaderboard