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.

Featured Replies

Hi All,

I have a database published via IWP with an FM hosting provider. It is a hotel booking engine with a payment portal.

Naturally users don't leave the site correctly, they don't click the logout buttons provided on every page/layout, just close the browser or their session times out. This creates partially empty records which I want to delete via a script that is placed on a button that is strategically placed on a certain layout.

The script looks for a certain field being empty in all records; this field is called "TransactionID". If the field is empty it means that the payment has not been completed and the record can be deleted.

Scenario: user #1 logs into the database and begins to fill in all the required fields. Before he even gets to complete his payment and click on the PAY button, user #2 logs into the same database, he clicks the button containing the "delete records" script and while still online, the record of user #1 gets deleted because his TransactionID is empty. Is this multi user scenario possible and if yes how can I prevent the record of user #1 to get deleted?

Thank you for any help or tips whatsoever...

Andy

Giving anonymous user the power to delete records is not an approach I'd take. Why does it even matter, I mean, why should users see any other records but their own?

You could use a separate "entry" table, or how about having the user enter data into global fields? That way, you don't even have to create a record until the user clicks OK, so you'll never have to worry about incomplete records.

  • Author

The reason for deleting the records is that behind every record there is a count for the hotels that the customer selects. When he enters the database he gets a variety of hotels that he can select from. Every time a customer selects a hotel the count for that hotel goes down. So if I have 50 available rooms at a Hilton and I have 40 people selecting the Hilton but actually not completing their purchase, I end up with a room count of 10 rooms left over which is incorrect. So I want to delete those "empty" records because they are useless to me and they mess up my room count.

I'm not sure how the global field option would work...

I would probably not count the room as not available until payment has been processed. Then extraneous records don't matter...

I'm not sure how the global field option would work...

http://help.filemaker.com/app/answers/detail/a_id/3604/~/global-fields:-an-overview

http://help.filemaker.com/app/answers/detail/a_id/5895

1. Create a separate layout that has global fields that correspond to your existing fields.

2. User enters data into globals, WITHOUT CREATING A RECORD. Each user sees only his/her own global values, and changing the values does not affect other users.

3. Click Submit button, run a script that verifies all required fields are filled, creates record, moves data from globals to fields in new record.

  • Author

Thank you guys; I'm currently working on trying both options, the "global" and the "room count after payment" and will see which one is more suitable for me...

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.