I have a "delete" button and I want to allow the user to click "delete" and the row is removed from the gallery table on the front end , but stored in a table on the backend in an "Inactive" column. I don't actually want the user to delete rows. How do I go about this.
Add an inactive column to the data source and filter the Gallery to only show records where the Inactive column does not equal "Inactive". When a user presses the delete button Patch the selected item and set the Inactive column to "Inactive"
How would I write the Patch function?
Assuming that you want the selected record in the gallery to be the one that is marked inactive. The Title field is included because its a required field. Make sure to include the current values of any other required fields too.
Patch(datasourcename, galleryname.Selected,{Title: <<current title>>, Inactive: "Incative"})
User | Count |
---|---|
254 | |
114 | |
93 | |
48 | |
38 |