Andrew McDonald Posted November 29, 2011 Posted November 29, 2011 Hi guys.I have a room allocation database. I have made a global number field, and when a room is allocated, it reduces the available number of rooms by one. Very simple and It works fine, but the number does not match for other shared users. I want the number to match for everyone. I thought global would do it. Any suggestions? Thanks
Vaughan Posted November 29, 2011 Posted November 29, 2011 You need to read up on how global fields work. They are user- and session-specific. I'd say that there is a better way of doing what you're trying to do, but we'd need to know more about your problem and its solution's implementation.
Andrew McDonald Posted November 29, 2011 Author Posted November 29, 2011 Thanks mate. have been trying to read the help. I suppose basically I want a field that will show the same data across a number of shared users that's global and not specific to a single record. A standard field, specific to a single record changes immediately for all users. I want that but global. I want to be able to specify a number of room vacancies by manually entering the total vacancies eg 100, and have that number reduce by one every time a room is allocated. I have already got scripts and buttons that do the room allocating, ie I press the button and the record is amended to offered status, emails get sent, paper forms printed etc. I want to be able to also have it reduce number of available rooms by one and have that calculation change on everyone's shared version of the database.
Vaughan Posted November 29, 2011 Posted November 29, 2011 Lots of ways to do this. One would be to use a "preferences" table to store the value, but need to watch for record locking issues (not hard).
Ocean West Posted November 29, 2011 Posted November 29, 2011 Andrew check out this video regarding a transaction model - its an understanding how commit records work. http://www.geistinteractive.com/2011/08/09/understanding-commit-record-video/
Andrew McDonald Posted November 29, 2011 Author Posted November 29, 2011 OK OW I sort of get that. So maybe a commit step would save the adjusted number and make it consistent across the shared files with my current global field? (Sorry, I'm not an expert. Reason I like FM is that people like me can adjust it easily!)
comment Posted November 29, 2011 Posted November 29, 2011 I have made a global number field, and when a room is allocated, it reduces the available number of rooms by one. When a room is allocated, there should be a record of the allocation. The number of available rooms can then be calculated by counting the number of allocations (presumably for a given time slot?) .
Andrew McDonald Posted November 30, 2011 Author Posted November 30, 2011 it doesn't have to be that complicated, all it is is a straight countdown. The allocations don't refer to a specific room, just a pool of available rooms More like a preallocation. What I've got works perfectly, the script subtracts one from a preset value stored in a specified field and displays that number. There are 9 different room types, and they all countdown correctly. I'm totally happy with that, and just that simple is perfect for this particular database, it's just that it needs to display that data on all the sharers.
Vaughan Posted November 30, 2011 Posted November 30, 2011 What I've got works perfectly ... it's just that it needs to display that data on all the sharers. Well, it's not working perfectly, and it's probably an architecture issue that is causing the problem.
Lee Smith Posted November 30, 2011 Posted November 30, 2011 Hi Andrew and welcome to the forum, Please update your profile to reflect your FileMaker version and platform. You do this by clicking on your name at the top right hand part of your screen, select my profile, and then click the button that says edit my profile. You'll find the FileMaker and operating system questions at the bottom of the screen. Lee
comment Posted November 30, 2011 Posted November 30, 2011 It's not about being complicated, it's about keeping track. When you make a mistake with a countdown, you lose the whole thing. That's not how you build a database. In any case, If you have a record for each room type and a field in that record to indicate the initial amount, the (not global) field that indicates how many remain should be in that same record.
Andrew McDonald Posted December 5, 2011 Author Posted December 5, 2011 Have updated my profile Lee. Consultant post. I don't have a record for each room type, I have a record for each applicant. I also want to see the availabilty for all room types all the time whatever applicant record I am on. Anyway, going back to my piece of paper and crossing them off for now.
comment Posted December 5, 2011 Posted December 5, 2011 I don't have a record for each room type, So where would you keep the initial number of vacancies? IIUC, there are 9 of them.
comment Posted December 5, 2011 Posted December 5, 2011 Anyway, have a look at this quick demo. Allocate.zip
Andrew McDonald Posted December 6, 2011 Author Posted December 6, 2011 Thank you, that actually gets very close. So I need to read up on portals and related fields, subjects that I have only a tenuous grasp of. That was very helpful. I was just holding the room available data in a number field, not related to specific records which are the room applicants.
Vaughan Posted December 6, 2011 Posted December 6, 2011 So I need to read up on portals and related fields, subjects that I have only a tenuous grasp of. Once you "get" the relationship thing, you'll blast ahead.
Recommended Posts
This topic is 5002 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 accountSign in
Already have an account? Sign in here.
Sign In Now