Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Data in Collection disappear when screen is switched

(0) ShareShare
ReportReport
Posted on by 1,091

I am creating a collection at OnVisible property of the screen1. Below is my code snippet. Though I am adding several columns using AddColumns but value of the column  AvgPFTDRating disappear from collection when I navigate to different screen from screen1.

 

ClearCollect(
 ColPFTD,
 AddColumns(
 AddColumns(
 ShowColumns(
 FirstN(
 SortByColumns(
 Filter(
 'OTJ Coaching Session_1',
 'PSR Name'.DisplayName = DataCardValue4.Selected.DisplayName
 ),
 "CurrentDate",
 Descending
 ),
 3
 ),
 "CurrentDate",
 "PSRName",
 "onetofivePFTD",
 "sixtotenPFTD",
 "eleventofifteenPFTD",
 "sixteentolastcallPFTD"
 ),
 "FormattedCurrentDate",
 Text(
 CurrentDate,
 "[$-en-US]dd-mmm"
 ),
 "onetofivePFTDRating",
 If(
 ThisRecord.onetofivePFTD.Value = "Poor",
 1,
 ThisRecord.onetofivePFTD.Value = "Average",
 2,
 ThisRecord.onetofivePFTD.Value = "Good",
 3,
 ThisRecord.onetofivePFTD.Value = "Very Good",
 4,
 ThisRecord.onetofivePFTD.Value = "Excellent",
 5
 ),
 "sixtotenPFTDRating",
 If(
 ThisRecord.sixtotenPFTD.Value = "Poor",
 1,
 ThisRecord.sixtotenPFTD.Value = "Average",
 2,
 ThisRecord.sixtotenPFTD.Value = "Good",
 3,
 ThisRecord.sixtotenPFTD.Value = "Very Good",
 4,
 ThisRecord.sixtotenPFTD.Value = "Excellent",
 5
 ),
 "eleventofifteenPFTDRating",
 If(
 ThisRecord.eleventofifteenPFTD.Value = "Poor",
 1,
 ThisRecord.eleventofifteenPFTD.Value = "Average",
 2,
 ThisRecord.eleventofifteenPFTD.Value = "Good",
 3,
 ThisRecord.eleventofifteenPFTD.Value = "Very Good",
 4,
 ThisRecord.eleventofifteenPFTD.Value = "Excellent",
 5
 ),
 "sixteentolastcallPFTDRating",
 If(
 ThisRecord.sixteentolastcallPFTD.Value = "Poor",
 1,
 ThisRecord.sixteentolastcallPFTD.Value = "Average",
 2,
 ThisRecord.sixteentolastcallPFTD.Value = "Good",
 3,
 ThisRecord.sixteentolastcallPFTD.Value = "Very Good",
 4,
 ThisRecord.sixteentolastcallPFTD.Value = "Excellent",
 5
 )
 ),
 "AvgPFTDRating",
 Value(
 Text(
 Average(
 onetofivePFTDRating,
 sixtotenPFTDRating,
 eleventofifteenPFTDRating,
 sixteentolastcallPFTDRating
 ),
 "[$-en]#.##"
 )
 )
 )
)

 My collection when I am on Screen1.

RameshMukka_0-1604776921565.png

The same collection when I navigate to another screen from screen1.

RameshMukka_1-1604776983505.png

 

  • rameshmukka Profile Picture
    1,091 on at
    Re: Data in Collection disappear when screen is switched

    Yes, am updating the collection at several places but this is only data that is being missed on screen switch. I will run the tool and check whats happening.

  • thjeffri Profile Picture
    Microsoft Employee on at
    Re: Data in Collection disappear when screen is switched

    Hi RameshMukka,

    That's some unusual behavior you're seeing.  Are you updating your collection anywhere else in the app?
    Have you tried using the Monitor tool to debug this and see what might be updating that column in the collection?

     

    Tom

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 770 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 494

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 399