Jump to content
Server Maintenance This Week. ×

Multiple Users and Records


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

Recommended Posts

Never really ran into the following problem - I think it is my lack of understanding of users/record and FM Server or the fields I am adding to my layout.

I tried to create a solution to checkout equipment to users (There are approximately 150 unique users in my solution) - all with the same privilege set) Part of the solution was to have the ability to reserve items.

Tables: Transactions, Users, Items, TransactionItems.

Relationships: Users:userID::Transactions:userID, Transactions:TransID::TransactionItems:TransID

I have two users who log in at the same time with their username. I have a global Field Users:UserAccount (an auto enter calc Get(AccountName) to display the unique user - This works fine.

These users have access to one layout - "reservations" (Using Transactions Table).

Script: When a user enters the layout - a new record is created - with fields TransID (serial Number) and Get(CurrentDate)- On the same layout I have Transactions:UserID and The related field Users:Username. The script then goes to the Transctions:UserID and populates with Get(AccountName). The Username populates correctly with the correct first/last name

This SEEMS to work fine - Both users are able to create unique records with the correct transaction ID, Date, Users can then select an item and a reserve date. They see their unique record within the window

The problem SEEMS to arise when a third user logs in and initiates the reserve script. .. BOTH of the first two users have their window refreshed with the data from new record from the third user (TransID, Item, ReserveDate). It does not delete either of the first two records.

Any ideas? Sorry for the long description.

Link to comment
Share on other sites

I have two users who log in at the same time with their username. I have a global Field Users:UserAccount (an auto enter calc Get(AccountName) to display the unique user - This works fine.

Change the startup script (or create one) using the onFirstWindowOpen trigger to set the Users:UserAccount field with Get( AccountName ).

There could be more to it but this is a start.

Link to comment
Share on other sites

I did this - but still having same problem (and I thought it was the third user... it is any other user.) Weirdness. Can you think of a reason why a user could login and create a record, then another user creates a record. When data changes in the second user record - the first users view is changed to the second user record? I do have a script within the rerservation layout that goes to the related record in Users (in a new window) to check to see if there are any blocks on the user account - then closes this window and selects the reservation layout. Could this be causing issues?

Link to comment
Share on other sites

I may have figured out what is going on, but not why/how. I may need help wrapping my brain around DB structure.

I have a transactions table. A new record in this table is created each time a user reserves a piece of equipment or checks out a piece. The record is marked with a status field (1 for checkout, 2 for reserve, 0 for complete). From a DB server/user standpoint, shouldn't two unique users be able to create records in this table at the same time? For example… User 1 is an Admin and is sitting in the checkout room, creating new records in the transactions table when students checkout equipment. User 2 is in another room on a workstation creating new records in the transactions table reserving items.

I have two issues: 1) I have now been getting the dialog box stating that "admin is currently modifying this record, you do not have access until…" when first going to a layout and 2.) If I am creating a new record in the transactions table as a reservation and then the admin is creating a new record in the table as a checkout, my screen changes the information to reflect the checkout transaction information - it does not stay on MY record...

Ouch - and I thought I understood the schema etc. - I guess not!

Link to comment
Share on other sites

That is strange.

Make sure that the process is actually creating new records and not editing existing records. The "admin is modifying this record" error suggests that a new record is not being made.

Link to comment
Share on other sites

This topic is 4209 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.