Hello all,
Please take reference from attached image.
In my power app, I have two data tables now I want to implement a function whenever I deleted any data on Datatable1 it should permanent move to the data Table 2
Please help me with this problem

Hello all,
Please take reference from attached image.
In my power app, I have two data tables now I want to implement a function whenever I deleted any data on Datatable1 it should permanent move to the data Table 2
Please help me with this problem
Hi @Nasreen
Use the Collect and Remove functions to remove a record from one data source and add it to another.
Collect(DataSource2, ThisItem);
Remove(DataSource1, ThisItem);I would also check if you can use a single data source, and add a column that indicates whether the record is deleted or not. For example, you can add a Boolean column called IsDeleted and set it to false by default.
Then, instead of deleting the record from the data source, you can update the IsDeleted column to true.
You can set the OnSelect property of the button to something like this:
Patch(DataSource, ThisItem, {IsDeleted: true})This will mark the current item as deleted, but not remove it from the data source.
If you have any questions or feedback, please let me know. Have a great day! 😊
-----------------------
PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻