Adam Bergeron
Adam Bergeron

Reputation: 525

Options for Archiving instead of deleting

So I have been using a normal Delete Button [widget.datasource.deleteItem();] option to remove entries from our data models, but after a user accidentally deleted the wrong item I realized I would need to change to a recoverable method.

My first thought was to just create a Boolean or String Field titled "Archived". Then have my table hide items (using this method) where the Archive status is set for "true" or "yes".

So Question 1 = What OnClick code would I use to tell App Maker to set the Archive Status of an item to "Yes" or "True"?

Question 2 = Is there a better method for archiving data model entries?

Thank you in advance!

Upvotes: 0

Views: 74

Answers (1)

Andrey Koltsov
Andrey Koltsov

Reputation: 1974

onClick -> "Custom Action" and use next code

widget.datasource.item.Archived = true;

Upvotes: 1

Related Questions