cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SylvieLet17
Continued Contributor
Continued Contributor

ClearCollect not working in OnStart

I have a weird issue with one of my apps. 

 

I need to collect data from a SharePoint library in the OnStart property of an app. 

The function is as follows: 

ClearCollect(PendingDocs,Filter(Documents,Title="FullClaim")) 

 

There are many documents in that library titled FullClaim. I want to collect all the documents that the current user has access to with that title. 
It works great on a button. There are 10 files with that title for my current user, she clicks the button, the files are collected.

However if I put that function in the OnStart property of the App, nothing is collected. Any ideas why?
I even tried to add a timer, with autostart and set the function on the OnTimerEnd property, but it still did not work. 

5 REPLIES 5
SylvieLet17
Continued Contributor
Continued Contributor

Actually I don't think any of my OnStart functions are working. I have another basic one: Set(varUserEmail,User().Email) and that one isn't working either.

Seems like a bug. Anyone else seen this before?

timl
Super User
Super User

@SylvieLet17 

Are you seeing this behaviour whilst building your app in the designer? If so, have you clicked the 'Run OnStart' menu item?

 

 

timl_0-1655216952749.png

 

SylvieLet17
Continued Contributor
Continued Contributor

Disregard my last update, my other OnStart functions are working, but not the ClearCollect. 

Yes I tried it in designer and it didn't work with the Run OnStart option either. 

SylvieLet17
Continued Contributor
Continued Contributor

Okay, reaaally sorry to have wasted your time, but it looks like this is due to a typo in the Flow that titles the documents. The typo was on one branch of a condition, which is why it appeared randomly for different users. 

Sorry guys!

timl
Super User
Super User

Glad you figured out the answer @SylvieLet17!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,713)