Jump to content

Simple Set Field By Name (i think)


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

Recommended Posts

I Have read some topics on "Set Field By Name" but the forums wont let me search for that specifically because the words are not big enough I guess. I'm pretty new to filemaker and basically teaching myself so I appreciate any help.

Here is what I am trying to do:

I have a table called "Bookings" with a field called "Seat" and another table "Seatmap" with all the seats as fields named for there assignments. All the seat fields are set to be "O" to show that they are available.

What I want to do is be able to type "13A" into the seat field. Then using a script trigger that starts when I exit the field have it go to the seatmap and replaces O with X in the field named 13A.

After the seat number is typed in and I click enter and this script runs:

>commit record/request

>go the related record [show only related records; From Table "Seatmap"...]

>Set Field By Name [bookings::Seat; "X"]

The script runs and get as far as displaying the seatmap, but does not change the field from an O to an X.

What am I doing wrong? Or am I not even close?

I am not to good when it comes to the fancy terminology of filemaker.

Thanks for the help.

Link to comment
Share on other sites

I have a table called "Bookings" with a field called "Seat" and another table "Seatmap" with all the seats as fields named for there assignments.

Woah, hold it right there. Seats should be related records, not fields.

Link to comment
Share on other sites

Well, I wanted to point you to a similar thread here:

http://fmforums.com/forum/topic/77277-seat-assignments-reservation-system/page__p__362805

but it turns it is your own. So that would be my answer to your question:

What am I doing wrong?
Link to comment
Share on other sites

Yup. One of the principles of databases is that if things are hard or complicated, then it's probably not done right. The whole point of relational design is to simplify things.

Link to comment
Share on other sites

OK So I set up so each seat is its own record in a table called seats. Seach record has a field for the Seat assignment, what class of service it is, status (to show whether or not its occupie), flight/date its for etc.... So is there a way I can set up a layout in filemaker to show it in the form of a map? For instance set up a layout that shows the contents of the the status field for each seat? I want to have one layout for each flight, and have the status field for each seat be positioned on the sceen where it would be on the aircraft.

Exapmple:

123

A OOO

B OOX

C OOO

D OXX

E OOO

F OOO

123

Is there a way of doing this?

Link to comment
Share on other sites

This topic is 4316 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
 Share

×
×
  • Create New...

Important Information

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