cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BrianR
Level 10

Re: syntax EOF

It could be something ABOVE your comment block.  While I'm not in PowerApps Studio at the moment, I don't believe that a lone semicolon is allowed, so unless something before the comment block NEEDS a semicolon, I'd take the lone one out.  That said, not sure if /* */ style comments can be used in the "middle" of a statement (prior to the ;), though // can.  But something above your comment block may be causing issues.

 

Also note that there are some quirks in how comments work - ie: nesting comments inside of comments does not work as it would in most environments.  

 

Super User
Super User

Re: syntax EOF

Ok, can you paste the code as plaintext please - diagnosing through outdated images that have already been partly corrected is going to be difficult...




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!
Super User
Super User

Re: syntax EOF

@BrianR
You can definitely put your semi wherever you want, and put comment blocks in wherever you want - I have loads of code beneath and above this:

 

image.png




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!
Super User
Super User

Re: syntax EOF

Hi,

 

I can see other issues here:

image.png

This should read:

If(IsBlank(EnterEngineHours.Text), UpdateContext({error1:true}), Navigate(ToyotaPreStartScreen,Screentransition.Fade); Notify("Pre-Start Submitted",NotificationType.Success))

 

 


And you might consider formatting your code in future to make things easier to decipher for yourself when issues like this occurr. I would for example format this section so that its easier to see what's true values, where your Else comma separator is and at what level of the logic you are at:

If(
    IsBlank(EnterEngineHours.Text),
                                                      //If True
                                                      UpdateContext( { error1: true } )
                                                      ,
                                                      //If False, then first navigate
                                                      Navigate( ToyotaPreStartScreen, Screentransition.Fade )
                                                      //Next False action is to notify user
                                                      ;

                                                      Notify("Pre-Start Submitted",NotificationType.Success)
)




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!
Thefournier351
Level: Powered On

Re: syntax EOF

the only thing changed in the code is the .value i missed. unfortunately on my work computer we are only enabled the studio license so i cant copy and paste any code

 

Thefournier351
Level: Powered On

Re: syntax EOF

.Text or the semicolon didnt fix the issue

Super User
Super User

Re: syntax EOF

You should still be able to copy paste if you go into the code block you are editing, Ctrl+A, Ctrl+C, then paste it back in here.

 

If not, then I'll wait for the next batch of screenshots with the errors highlighted and error messages included 🙂




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!
Thefournier351
Level: Powered On

Re: syntax EOF

Issue1.pngIssue5.png

Thefournier351
Level: Powered On

Re: syntax EOF

Issue5.1.pngIssue5.2.png

Super User
Super User

Re: syntax EOF

Ok so those screenshots confirm what I said before:
You are missing  }  to indicate that your update/record to Patch has ended
image.png

(which is why it still says that you are within the update section)

Then you will need two further brackets ) ) to end the Patch( and then the If( surrounding it.

 

 

I created a simplified test case to show this - note the spacing so that you can easily see where you are within the code:

 image.png

It's also worth noting here that I used your example of Condition.Value=true, but you don't have to do this with boolean items such as toggles as it will evaluate it when called directly, so you could just have for example:
If(AirFilterToggle && BatteryToggle 
and for false values:
If(!AirFilterToggle && !BatteryToggle 

 

So anyway, the Test App looks like this (I have attached it as an .msapp):


image.png
image.png
image.png
image.png

Now If I remove the } ) ) I mentioned before it still thinks we are within the Update section:

image.png




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,828)