Jump to content
Server Maintenance This Week. ×

multiple user problem?


This topic is 4434 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 4434 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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