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

On Start Error

Hi All - 

 

I have recently started to get an error when my app loads (See screenshot attached). I have tried to trouble shoot but I am unsure of how to proceed. When I run the On Start command in edit mode the data properly loads into the collection without any issue. Only when I launch the app in Play mode do I receive the issue. Below is my On Start procedure. Thoughts? Screen Shot 2019-12-13 at 11.57.32 PM.png

 

Concurrent(
ClearCollect(
AllRAWDATA,
'[dbo].[Slow_Moving_Raw_Data]'
),
ClearCollect(
ColPlanReview,
'[dbo].[Slow_Moving_Raw_Data]'
),
Set(
varUser,
User().FullName
),
Set(
varUserEmail,
User().Email
),
Set(
varToday,
Text(
Today(),
DateTimeFormat.ShortDate,
"en-US"
)
),
Set(
varManagerName,
Office365Users.Manager(Text(Office365Users.MyProfile().Id)).DisplayName
),
Set(
varPeriod,
Text(
Today(),
"[$-en-US]mmmm - yy"
)
),
Set(
varAdmin,
Value(1)
)
)

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: On Start Error

@tlevine 

The next step is ensure this advanced setting is turned off.  In previous forum posts it fixed the issue.

 

pic1.PNG

 

I am going to repost a formatted version of your code here to enhance readability for myself.  After doing some testing there appears to be nothing wrong with the SET variables.  The CLEARCOLLECT statements look fine so I'm wondering if toggling that advanced setting will fix the isuse.

Concurrent(
    ClearCollect(
        AllRAWDATA,
        '[dbo].[Slow_Moving_Raw_Data]'
    ),
    ClearCollect(
        ColPlanReview,
        '[dbo].[Slow_Moving_Raw_Data]'
    ),
    Set(
        varUser,
        User().FullName
    ),
    Set(
        varUserEmail,
        User().Email
    ),
    Set(
        varToday,
        Text(Today(),DateTimeFormat.ShortDate,"en-US")
    ),
    Set(
        varManagerName,
        Office365Users.Manager(Text(Office365Users.MyProfile().Id)).DisplayName
    ),
    Set(
        varPeriod,
        Text(Today(),"[$-en-US]mmmm - yy")
    ),
    Set(
        varAdmin,
        1
    )
)

 

Let me know how it goes.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

5 REPLIES 5
Super User
Super User

Re: On Start Error

@tlevine 

There's an issue at the 427th character in your code.  What happens if you remove this code block?  Does this issue go away?  If yes, then its the problematic code.

Set(
varPeriod,
Text(
Today(),
"[$-en-US]mmmm - yy"
)
),

 

Also, you will want to change this code at the end of your block

Value(1)

 

Into this instead.

1

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

tlevine
Level 8

Re: On Start Error

Hi - thank you or the reply. I did remove the code but the issue still persists. Any other ideas I could try?

Super User
Super User

Re: On Start Error

@tlevine 

The next step is ensure this advanced setting is turned off.  In previous forum posts it fixed the issue.

 

pic1.PNG

 

I am going to repost a formatted version of your code here to enhance readability for myself.  After doing some testing there appears to be nothing wrong with the SET variables.  The CLEARCOLLECT statements look fine so I'm wondering if toggling that advanced setting will fix the isuse.

Concurrent(
    ClearCollect(
        AllRAWDATA,
        '[dbo].[Slow_Moving_Raw_Data]'
    ),
    ClearCollect(
        ColPlanReview,
        '[dbo].[Slow_Moving_Raw_Data]'
    ),
    Set(
        varUser,
        User().FullName
    ),
    Set(
        varUserEmail,
        User().Email
    ),
    Set(
        varToday,
        Text(Today(),DateTimeFormat.ShortDate,"en-US")
    ),
    Set(
        varManagerName,
        Office365Users.Manager(Text(Office365Users.MyProfile().Id)).DisplayName
    ),
    Set(
        varPeriod,
        Text(Today(),"[$-en-US]mmmm - yy")
    ),
    Set(
        varAdmin,
        1
    )
)

 

Let me know how it goes.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

tlevine
Level 8

Re: On Start Error

That worked for me! What exactly does that setting do?

Super User
Super User

Re: On Start Error

@tlevine 

Judging strictly from reading old forum posts the purpose of this setting is simply to break people's apps LOL. (That's a joke).

 

I haven't got a hot clue what it does 😿 Perhaps @v-xida-msft can let us know the next time he is online.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

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 Solution Authors
Top Kudoed Authors
Users online (4,358)