November 29, 201114 yr 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
November 29, 201114 yr 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.
November 29, 201114 yr Author 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.
November 29, 201114 yr 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).
November 29, 201114 yr 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/
November 29, 201114 yr Author 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!)
November 29, 201114 yr 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?) .
November 30, 201114 yr Author 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.
November 30, 201114 yr 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.
November 30, 201114 yr 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
November 30, 201114 yr 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.
December 5, 201114 yr Author 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.
December 5, 201114 yr 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.
December 6, 201114 yr Author 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.
December 6, 201114 yr 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.
Create an account or sign in to comment