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 / How to save collection...
Power Apps
Unanswered

How to save collections when changing windows

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I've got an application which has 10 sections

Due to numerous reasons i've had to divide the application into 10 different sections, each with an individual collection

 

The problem i have is that when i go away from the screen to another screen, the collection will disappear. So anything I've typed into the text box or even the number of text boxes will reset and delete. 

How do i design it such that when i leave the screen, none of the information is lost and it stays there

 

I would eventually want several users to be able to use this concurrently, so perhaps a save button could help? But i'm unsure what to write in it

 

 

Power1231_2-1692081571643.png

 

1 section of the app. Press "+Add task" to add a new textbox and checkbox. I've had to write this formula for that button to work: Collect(TaskB10,CountRows(TaskB10))

 

Power1231_1-1692081346856.png

 

The current OnVisible property of the screen

 

 

Categories:
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    The reason for the data reset may be that you have not saved it. I suggest you save the required data to the corresponding field.

     

    Is taskB10 a collection used to store the value of TextInput? I assume you want to store the contents of TaskB10 into a collection, and I named this collection with "TaskB10".

     

    If you want to store the value of the TextInput into a collection, you can follow this.

     

    On the OnHidden of my Screen:

    Collect(TaskB10,{stuff1:"",stuff2:""})

    On the OnSelect of a button:

    Patch(TaskB10,Defaults(TaskB10),{stuff1:TextInput2.Text,stuff2:TextInput3.Text});

    vmengmlimsft_0-1692087146717.png

    Then it will save the value in two TextInput and the value in TaskB10 will not disappear after you changed the Screen.

     

    If you want to get the number of records in the collection, you can also set it like I did in the above picture.

    vmengmlimsft_1-1692087146720.png

    Hope it will help.

     

    Best regards,

    Rimmon Li

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard