Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem with -Delete

Featured Replies

I am having a problem with the -Delete Tag.

I have a shopping cart application that has a format called "view cart" which allows a user to view all items in their cart. Also, in this view, they can delete individual items. The problem is, when they click to delete one item, another item may be deleted instead. I think that the -delete tag is picking up the wrong CurrentRecordID tag but I am not sure if this is the case, nor do I know how to fix it.

Also, is there a way to combine actions on a submit button? When the user clicks the delete button, I think I need to re-perform the find and refresh the browser to reflect the current items in the cart. Is there a way to combine the -delete and -find tags?

I know of no way to combine the two tags. The solution I have used is use one tag (in the <form>...</form> instruction) and <input type="hidden" name="-script" value="scriptname"> and write a script to cause a delete after the -find (or vice versa if that is what meets your needs.

Sometimes these scripts are easy and straight-forward, and sometimes you will spend hours, even days, getting them right. It depends on what you are trying to accomplish. Good Luck.

Peace

Keith M. Davie

  • 1 month later...
  • Newbies

while we're on the subject of deletes...again, following the examples provided by FileMaker, i included a Javascript confirm command with the delete button and have found that the record is deleted whether i click OK or Cancel. a lot of good that confirm dialog does, huh?

does anyone know to cancel a delete action through a dialog box? thanks.

[This message has been edited by wayking (edited July 19, 2000).]

[This message has been edited by wayking (edited July 19, 2000).]

  • Author

Well, I found that they problem is cleared up when I reference the current rec id with the delete button. The cart automatically refreshes when I use the correct method to do this, thus eliminating the need to combine with the find tag.

As far as the Javascript to confirm, how about this... Use a general tag other than delete (such as find all or something) for your button and upon confirmation of delete, THEN have the javascript prompt filemaker to delete the record. I use this same method without the javascript. For instance the button that says delete is really just a "find this item" button. Therefore it shows up by itself on the next page. On that page, the button that says to confirm the delete is the real delete button and the button that says nevermind will re-find all the items and show them together again. Hope this helps. smile.gif

  • 2 weeks later...

quote:

Originally posted by wayking:

while we're on the subject of deletes...again, following the examples provided by FileMaker, i included a Javascript confirm command with the delete button and have found that the record is deleted whether i click OK or Cancel. a lot of good that confirm dialog does, huh?

does anyone know to cancel a delete action through a dialog box? thanks.

I have used the following on my edit/delete current record page with success:

code:


<INPUT TYPE="Submit" NAME="-delete" VALUE="Delete Record" onClick="return confirm('Really delete this record?')">

Clicking on OK loads a confirmation message that the record was deleted. Clicking on Cancel closes the dialog box and the current record is still displayed.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.