cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

"Indent" where "Control" is expected

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

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

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



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

2 REPLIES 2
Super User
Super User

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



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

Anonymous
Not applicable

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

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (47,904)