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
JR-BejeweledOne
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
JR-BejeweledOne
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.
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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,728)