web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collection is not popu...
Power Apps
Unanswered

Collection is not populated at OnStart with data from dynamics fin ops Table/Entity

(0) ShareShare
ReportReport
Posted on by 195

App OnStart i create a collection

ClearCollect(collect_workflowworkitem,Blank());
ForAll(EntityworkflowWorkitemData As d365entity,
 Collect(collect_workflowworkitem,
 {
 FullNameOriginator: LookUp(PersonUsers, ID = d365entity.'User (Originator)','Person name'),
 Status:d365entity.Status,
 'User (Originator)':d365entity.'User (Originator)',
 Subject:d365entity.Subject,
 'Work item instructions':d365entity.'Work item instructions',
 WorkflowWorkItemClaimed:d365entity.WorkflowWorkItemClaimed,
 'User (UserId)':d365entity.'User (UserId)',
 'Due date time':d365entity.'Due date time'
 }
 )
);

 

The collection is not populated when I run app, however, in Collections headers are formed

akg1421_0-1664446959619.png

 

The data source is staging table (also known as Entity) from Dynamics365 fin ops. Where isn't the data loading? Will it take longer times to load even when App's OnStart has been called.

Please note the app starts running and the gallery control having collect_workflowworkitem as the data source shows no data

 

@RandyHayes @WarrenBelz @Drrickryp @BCBuizer @AhmedSalih @dpoggemann @timl @phipps0218 @Pstork1 @Nogueira1306 @NandiniBhagya20 @victorcp @Anonymous @Yahya @iAm_ManCat @mdevaney @Gochix @Mira_Ghaly @poweractivate @jatcube @calvp 

Categories:
I have the same question (0)
  • victorcp Profile Picture
    2,350 Moderator on at

    Hi,

    is EntityworkflowWorkitemData a variable/collection? if so, are you setting it before run that code?

    can you make sure there is information in EntityworkflowWorkitemData

  • amk1421 Profile Picture
    195 on at

    @victorcp 

     

    "EntityworkflowWorkitemData" is like anyother datasource (via Dynamics365finops connector). Yes it contains information under column names in database. Issue is also, after few navigations in App the data is loaded in the collection but OnStart lets screen loads without first completely loading data from my datasource.

  • calvp Profile Picture
    7 on at

    So I noticed a similar issue in a current project.

    My diagnosis is that on start continues running in the background if it has a long processing time. I personally need to fill two collections from an API through a custom connector. 

    My "solution" was to put a loading animation that overlaps my start page and gets hidden at the end of on start. 

    It's not the cleanest but it allows the screen to not be used before everything is ready.

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Check your setting in the app for OnStart Blocking.  If that is enabled the app will load before you finish loading data from Dataverse.  But I usually find using OnStart to access data through connectors is not reliable.  Instead I would put that code in the OnVisible routine of a Splash screen that loads first in the app.  If you use the same code in a button after your app loads do you get results in the collection?  If you do then the problem is using that code in OnStart.  If you don't then something is wrong with the code itself.

    image.png

  • amk1421 Profile Picture
    195 on at

    @Pstork1 

     

    App.Onstart did not work Screen.OnVisible also did not work.

     

    Using Button.OnSelect loads data but takes as much time with other options. The data is loading so nothing is wrong with the code only the ootb features by powerapps seem to be unreliable.

     

    Also the Settings > "Use non-blocking OnStart rule" apparently has no effect.

     

    Any other way around?

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Did you try Screen.OnVisible running in the client, or just in the Design web site Preview?  It won't work on the Preview because the event doesn't fire in the Preview.  It should work in the production client.  App.OnStart probably won't work for loading a large data source due to the timing of accessing the connection.  I don't know of any other workaround.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard