Page 1 of 1

Update instead of Delete

Posted: Mon Aug 08, 2022 5:20 am
by FedeLopez

Hi all... I have a "Status" field on each table...
where possible status are:
1 = ok
2 = check
3 = deleted.

Users canĀ“t see deleted... admins see them in red background.
I added on Delete Page -> Page_Load

ExecuteUpdate(
UPDATE TableName
SET FieldName = 3
WHERE IDFIeld = Route(1))

and then back to list pge... and actually work...
But... I would like to add some confirm... or do that action when user submit the "delete" button...
right now it the item dissapear from list (except for admins) as soon as he press the Tras can icon...

Thanks


Re: Update instead of Delete

Posted: Mon Aug 08, 2022 9:30 am
by arbei

If you have not enabled "Inline-Delete", the user will be redirected to the Delete page to confirm, but you execute your UPDATE statement and go back to the List page on Page_Load, so there is no confirmation.

You may try to enable "Inline-Delete" so there is a JavaScript confirm dialog before accessing the Delete page, see Table Setup -> Delete.


Re: Update instead of Delete

Posted: Tue Aug 16, 2022 10:52 am
by FedeLopez

That did work perfectly.

Thanks