cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Regular Visitor

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
Highlighted
Super User
Super User

Re: Unexpected Token Error

You only need one semicolon. Take out the second one
Highlighted
Regular Visitor

Re: Unexpected Token Error

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

 

unexpected token.jpg

 

Regular Visitor

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,777)