cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Bug/Issue "Delayed Load" option causes failure to Collect in OnStart for SQL Server views

So here's my scenario:

 

App.OnStart:  ClearCollect(ProjectLists, dbo.ProjectView)
(Dropdown List)dlProjectList.Items:  ProjectLists

When loading this in the app designer, everything seems to work fine.  But when loading a published version for use, the dropdown will end up empty.  This isn't 100% replicable, sometimes it works, sometimes it doesn't, but it seems like once it stops working it'll remain broken forever.

Turning off "Delayed Load" resolves this issue completely.

 

I'm not sure what Delayed Load does exactly, but my suspicion is that it's doing something like connecting the dropdown to the collection BEFORE the Collect runs in OnStart, because it's delaying the collection until "needed".  I haven't verified if the collection ends up with data and the dropdown is empty, or if the collection is also empty.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Bug/Issue "Delayed Load" option causes failure to Collect in OnStart for SQL Server vi

Hi @aabrin,

 

See the explaination about Delayed Load in documentation here:

When we bind a table directly to a UI Element as in Option 1, the call to the table will happen automatically when the app loads even if the screen is not yet visible. If you have app with 10 screens and each screen has multiple controls directly bound to your data source, at load time, your app will make a pretty significant number of network calls as it evaluates each one of these controls across all screens. There is an experimental flag that one can set to avoid this behavior:


clip_image002

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Re: Bug/Issue "Delayed Load" option causes failure to Collect in OnStart for SQL Server vi

Hi @aabrin,

 

See the explaination about Delayed Load in documentation here:

When we bind a table directly to a UI Element as in Option 1, the call to the table will happen automatically when the app loads even if the screen is not yet visible. If you have app with 10 screens and each screen has multiple controls directly bound to your data source, at load time, your app will make a pretty significant number of network calls as it evaluates each one of these controls across all screens. There is an experimental flag that one can set to avoid this behavior:


clip_image002

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Advocate II
Advocate II

Re: Bug/Issue "Delayed Load" option causes failure to Collect in OnStart for SQL Server vi

To be clear, I'm really just trying to communicate a bug I found, not really looking for a "solution", as the solution is turning off the option.

Highlighted
Super User
Super User

Re: Bug/Issue "Delayed Load" option causes failure to Collect in OnStart for SQL Server vi

Hello @aabrin and @v-monli-msft.

I'm having the same issue: ClearCollect is not running consistently against a SQL View on mobile device only. Works fine in IDE Preview and Browser Player.

My code is not OnStart, but rather OnSelect of a button. Unfortunately, turning off Delayed Load DID NOT fix the issue.

Other suggestions? This app is now past due because of this issue.

Thanks

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 (9,279)