ktownson Posted June 5, 2001 Posted June 5, 2001 I'm trying to put together a program that will reserve a particular theater seat when you click on a picture of a chair. Is there a calculation to return just the field name (as text) you are clicking on? For example, the layout includes a field named A01, which represents the 1st seat in row A. What I'd like to do is click on A01 (using the field as a button to start a script) and have "A01" appear in a repeating field called "reserved seats." It's a bit more complicated that I have described, but I've got most of the rest of it worked out. I can't find anything about this, though...thanks!
LiveOak Posted June 5, 2001 Posted June 5, 2001 The status function "Status(CurrentFieldName)" will do this for you. If you want to click into the field and have the name captured, you will need one script per field: Go to field (A01) Set Field (gCaptureName, Status(CurrentFieldName) Assign the script to the field. You need separate scripts, without the first script step, you won't capture the field name as you are not yet "in the field". -bd
JPaul Posted June 5, 2001 Posted June 5, 2001 Hello Ktownson, if you assign a script to a field it acts as it would be a button then the status function is unnecessary: Via script you can directly assign the right value to your "reserved seats" field: - Set Field (ReservedSeats,"A01") when you click on A01 field - Set Field (ReservedSeats,"A02") when you click on A02 field obviously modify my statements to fill a repeat. field, instead of a normal text field. If possible, avoid the use of repeat. fields: they are hard to handle and consitute a real trap if you have to import /export them. Regards
ktownson Posted June 6, 2001 Author Posted June 6, 2001 Thanks for the replies...what I'm really trying to do is avoid writing a script for each button. The way the related databases are laid out, there is a field for each seat--all 216 of them. I was looking for a more elegant way of scripting that would allow me to click on a seating chart, return the name of the field as a value, then use that value to change the state of the seat to reserved or already picked up. Some research showed me that v.5.5 has this capability--I'm usuing 5.0 so maybe I should upgrade.
billholt Posted June 6, 2001 Posted June 6, 2001 Another possibility is to use the plugin, I forget the name, which returns mouse position. You could have each of the seats defined by its position in the theator and select the seat position by calculation. This would require one script to return the location and, if you can express the seating arrangement as a grid, would require only two calculations to define the chosen seat from the click. Bill Holt
Vaughan Posted June 6, 2001 Posted June 6, 2001 So you are going to have 216 fields in your database, one for each seat?!? I'd try to simplify the data design a bit and instead use a related file to store each seat as a record. Much easier to add and remove seats in the future... makes it more portable if the solution works well and has commercial potential, too.
ktownson Posted June 7, 2001 Author Posted June 7, 2001 Again, thanks for all the help for a certified Filemaker newbie. As an update, I kinda gave up on the click and fill concept after consultation with the client (my wife!). We consolidated the layouts into one screen so the click thing would be nice but not necessary. Simpler is better in my book. I chose to create each seat as a field so I could be more visual in the layout. Each seat is a container field which changes color when its status changes to one of the three states (available, reserved, picked up). These have to be updated on the fly, which is the main reason I chose Filemaker over MS Access. Perhaps there is a more practical way to make this happen, but what I've got works and I only need to please my wife, the box office chairperson! Besides, I'm a graphic artist and my left brain has atrophied from lack of use... On a side note, if there are any Filemaker Inc. folks lurking, your online description of how to create a join file ranks as one of most egregious examples of convoluted writing I have ever tried to wade through. Did you translate it from Sanskrit or something? Sheesh!
Recommended Posts
This topic is 8574 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