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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collection works in Pr...
Power Apps
Answered

Collection works in Preview but not when actually running the App

(0) ShareShare
ReportReport
Posted on by 289

Hi community,

 

I have a Gallery, which its data source is coming from a collection.

 

The collection contains data from several SharePoint sources. I have noticed that when I run the App in preview mode, the Gallery refreshes as it supposes to. However, if I actually run/play the app, the Gallery doesn't refresh - the Clear Collection and Re-collect data does not work.

 

Please advise, thank you. 

Categories:
I have the same question (0)
  • MagnusGöransson Profile Picture
    424 on at

    Hey,

    Please include the formulas you are using, otherwise its hard to help!

  • lliu_western Profile Picture
    289 on at

    OnSelect :   

     

    Refresh('Source A'); Refresh('Source B'); Refresh('Source C'); Refresh('Source D'); Set( varALTab, 1 ); Clear(collTemp); ForAll('SourceA ',Collect(collTemp,{id:ID,Name:FullName,CreatedDate:Date,Approved:Approved,Rejected:Rejected,Type:"A"}));ForAll('Source B',Collect(collTemp,{id:ID,Name:FullName,CreatedDate:Date,Approved:Approved,Rejected:Rejected,Type:"B"}));ForAll('Source C',Collect(collTemp,{id:ID,Name:FullName,CreatedDate:Date,Approved:Approved,Rejected:Rejected,Type:"Source C"}));ForAll('Source D',Collect(collTemp,{id:ID,Name:FullName,CreatedDate:Date,Approved:Approved,Rejected:Rejected,Type:"D"}));

  • MagnusGöransson Profile Picture
    424 on at

    Hmm, interesting formula. I haven't checked every aspect of it, but it seems okay.

    Have you tried using the Monitor while you are running the app to see whats happening in the back ground when it fails?

  • lliu_western Profile Picture
    289 on at

    Not too sure how to try the monitor? 

  • Verified answer
    MagnusGöransson Profile Picture
    424 on at
  • Verified answer
    lliu_western Profile Picture
    289 on at

    Found the issue. There was another button in the cover page that requires the editing I have done for the refresh on the collection. 

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 463

#2
WarrenBelz Profile Picture

WarrenBelz 364 Most Valuable Professional

#3
11manish Profile Picture

11manish 275

Last 30 days Overall leaderboard