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 / Previous entries disap...
Power Apps
Unanswered

Previous entries disappear after adding a new one.

(0) ShareShare
ReportReport
Posted on by 103

Hi, 
I've a gallery grid connected to SP list. 

Screenshot_66.png


When I try to add a new row, my previous row disappeared. 

Screenshot_68.pngScreenshot_67.png

Could you please help me, what the problem is?

OnSelect property on Add button:

ForAll(
 Sequence(NumberInput1.Value),
 Patch(
 TableList,
 Defaults(TableList),
 {
 Column1: "",
 Column2: "",
 Column3: "",
 GUID_Form: DataCardValue5.Text
 }
 )
);
Set(varReset, false);
Set(varReset, true);
Categories:
I have the same question (0)
  • Sohan Profile Picture
    154 on at

    Hello, @xvzms You may create a collection for that, like you have created a collection in the app on start, and then you may patch the value in this collection, and this collection will be used as a data source. I hope this will help you. Please accept it as a solution if it's helpful to you. Thanks!

    App On start's Collection:

    ClearCollect(
        colSheetData,
        {ID: 1}
    );
     
    Screen's on visible property:
    If('galTimeSheetNewEntry'.AllItemsCount = 0 , Patch(
        colSheetData,
        Defaults(colSheetData),
        {
            ID: If('galTimeSheetNewEntry'.AllItemsCount =  0 , 1, Last(colSheetData).ID + 1)
           
        }
    ))
     
    + Add button code:
    Patch(
        colSheetData,
        Defaults(colSheetData),
        {
            ID: If(
                'galTimeSheetNewEntry'.AllItemsCount = 0,
                1,
                Last(colSheetData).ID + 1
            )
        }
    );
     
    Remove line code:
     Remove(//If delete icon was selected
            colSheetData,
            LookUp(
                colSheetData,
                ID = galTimeSheetNewEntry.Selected.ID
            )
        );



  • Sohan Profile Picture
    154 on at

    Hello @xvzms,
    You may create a collection for that, like you have created a collection in the app on start, and then you may patch the value in this collection, and this collection will be used as a data source. I hope this will help you. Please accept as a solution if it's helpful to you. Thanks!
    App's on start collection:

    ClearCollect(
        colSheetData,
        {ID: 1}
    );


    Screen's on visible property collection:

    If('galTimeSheetNewEntry'.AllItemsCount = 0 , Patch(
        colSheetData,
        Defaults(colSheetData),
        {
            ID: If('galTimeSheetNewEntry'.AllItemsCount =  0 , 1, Last(colSheetData).ID + 1)
           
        }
    ));

    + or Add line button collection code:
    Patch(
        colSheetData,
        Defaults(colSheetData),
        {
            ID: If(
                'galTimeSheetNewEntry'.AllItemsCount = 0,
                1,
                Last(colSheetData).ID + 1
            )
        }
    );

    Delete or remove line collection:

     Remove(//If delete icon was selected
            colSheetData,
            LookUp(
                colSheetData,
                ID = galTimeSheetNewEntry.Selected.ID
            )
        );






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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 84

#2
WarrenBelz Profile Picture

WarrenBelz 79 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 40 Super User 2026 Season 1

Last 30 days Overall leaderboard