cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skasper
Level: Powered On

Unexpected Token Error

Hi,

 

 

I am encountering an error 'unexpected token' when trying to run my PowerApp on the phone/tablet/web. It works fine in PowerApp Studio.

 

The error is on each of the three screens (browse, Detail, Edit). E.g. the function behind the '+' button for adding new records looks like this when opened in the web designer:

 

NewForm(EditForm1),,Navigate(EditScreen1, ScreenTransition.None)

The 'unexpected token' error is related to the comma (',') after ...(EditForm1).

 

Oddly, when opening the same App in Sudio, the same function looks like this:

NewForm(EditForm1);;Navigate(EditScreen1; ScreenTransition.None)

Here is what I did to create the App:

  1. Create a custom list in SharePoint online
  2. Click 'PowerApps', 'Create App' from the menu
  3. Edit the App in Studio
  4. Save and publish App

 

I suspected a problem with my regional settings, where I have semicolon (';') defined as list separator, which seems to be considered in Studio but not in the Web Designer. Changing this to comma (',') did not help.

 

So I am a bit at a loss as how to proceed, without losing the work I already put in. Any ideas?

 

Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
skasper
Level: Powered On

Re: Unexpected Token Error

Based on @Drrickryp's input I played around a bit more. Turns out that the solution seems to be to edit the PowerApp in Web Designer and replace the two commas ',,' with a single semicolon ';'.

 

So we go from this:

NewForm(EditForm1),,Navigate(EditScreen1, ScreenTransition.None)

To this:

NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None)

I want to emphasize, that the code with two commas is the one automatically generated by PowerApps Designer, when I created the App based on a SharePoint list. I can only conclude that their is something fishy.

 

However, this fix seems to work and hopefully helps others.

 

 

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Unexpected Token Error

You only need one semicolon. Take out the second one
skasper
Level: Powered On

Re: Unexpected Token Error

Thank you for the swift reply. Alas, also with a single comma, the problem remains the same:

 

unexpected token.jpg

 

skasper
Level: Powered On

Re: Unexpected Token Error

Based on @Drrickryp's input I played around a bit more. Turns out that the solution seems to be to edit the PowerApp in Web Designer and replace the two commas ',,' with a single semicolon ';'.

 

So we go from this:

NewForm(EditForm1),,Navigate(EditScreen1, ScreenTransition.None)

To this:

NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None)

I want to emphasize, that the code with two commas is the one automatically generated by PowerApps Designer, when I created the App based on a SharePoint list. I can only conclude that their is something fishy.

 

However, this fix seems to work and hopefully helps others.

 

 

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 367 members 4,052 guests
Please welcome our newest community members: