cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AlexN
Level 8

BUG: Can't start app because OnStart() code gets messed up in international setting (e. g. German)

With the current version (3.19043.16), saving the app messes up the OnStart() code.

 

My code:

Set(MyUserId;Office365Users.MyProfile().Id);;
Set(HomeTimerStartTime;Now());;
Set(UTCNow;Today());;
Set(UTCNext;DateAdd(UTCNow;2;Days));;

When I save and reopen the app, the OnStart code has changed to:

Set(MyUserId;;Office365Users.MyProfile().Id);;;;
Set(HomeTimerStartTime;;Now());;;;
Set(UTCNow;;Today());;;;
Set(UTCNext;;DateAdd(UTCNow;;2;;Days));;;;

which prevents the app from starting.

 

Even if I try to change that to the US format:

Set(MyUserId,Office365Users.MyProfile().Id);
Set(HomeTimerStartTime,Now());
Set(UTCNow,Today());
Set(UTCNext,DateAdd(UTCNow,2,Days));

 It changes to

Set(MyUserId;Office365Users.MyProfile().Id);
Set(HomeTimerStartTime;Now());
Set(UTCNow;Today());
Set(UTCNext;DateAdd(UTCNow,2;Days));

which also doesn't "compile" due to missing semicolons at the end of the line (we need two in Germany). When I add the missing semicolons, the same automatic change as in the first two parts happens.

3 REPLIES 3
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: BUG: Can't start app because OnStart() code gets messed up in international setting (e. g. German)

I tried the same scenario, even a (very similar) expression, and couldn't reproduce your issue:

Set(MyUserId;'Office365-Benutzer'.MyProfile().Id);;
Set(HomeTimerStartTime;Now());;
Set(UTCNow;Today());;
Set(UTCNext;DateAdd(UTCNow;2;Days));;

I was able to save an app with this expression on the OnStart. If you create a new app and have a similar expression, do you see the same issue, or does it happen with a specific app only?

One thing you can try - removing the last ';;' from the expression, since there are no other statements after the line that sets the UTCNext variable. Can you let us know if this makes a difference?

pasweh
Level: Powered On

Re: BUG: Can't start app because OnStart() code gets messed up in international setting (e. g. German)

Hi @AlexN,

 

It seems you've discovered the same kind of error I have. Only with the difference that it doesn't concern OnStart() in my case but a normal button.

I am at least glad that I am not an individual case and hope that the bug will be fixed soon.

 

Here is my topic: https://powerusers.microsoft.com/t5/General-Discussion/Faulty-saving-process/m-p/271554#M79365

AlexN
Level 8

Re: BUG: Can't start app because OnStart() code gets messed up in international setting (e. g. German)

Have the same problem with another app now. What both have in common: They are older apps that didn't have the separate OnStart() trigger nor the "App" part before. Both had the OnStart() trigger on the first form.

 

When I start editing, the App "part" with the separate OnStart gets created, but completly messed up. Afterwards there is no way to repair, it always ends up messed up after loading the editor.

 

Exporting the app as zip though shows, that the code is correct after export. So this must be some import problem.