Jump to content

filemakerlearner

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by filemakerlearner

  1. Hmm. I am making progress, but still stuck. I have created a TOG for this layout. The Instance of Service TO links to two TOs: Service Plan (which contains details of the service plan) and Client (which contains the ID of the active service plan). [Note -- I included the ID of the active service plan in the Client record, but I think it makes sense to keep the plan itself in a separate table, since there can be multiple plans over time.] I have two fields in the layout that I want to autopopulate once the Client ID is selected. (Note: for Client ID, I'm using a value list that maps from Client ID to client name.] 1. I want the active service plan ID to auto-populate. I have this field on my layout set to point to that field in the Client table, however nothing happens when I select the client from the dropdown list. Maybe I have the field settings wrong? It is an edit box -- I am not sure how to make it a non-editable thing that just shows a value. I've checked and I do have this value populated in the table for each of the clients, so that doesn't seem to be why it's not showing up. 2. There is another value that I want to populate based on both the Client ID and the active plan ID... but if I get #1 working, maybe I can figure this part out.
  2. Sorry, let me try to be more clear, or maybe even give a smaller example that is related. This is a different database model, but similar. There are clients and staff. I am on the layout for a table that documents instances of service, when a staff person works with a client. In addition, each client has a service plan, which a staff person has helped create (possibly a different staff person, as multiple staff work with the same client). The user picks a client from a dropdown of available clients. I would then like another field on this layout to immediately populate with the name of the staff who created the service plan (staff and client IDs for the service plan are stored in the service plan). To make it more complicated, each client has multiple service plans (like the course plans above), and each may be created by different staff. However, only one is active. In addition to pulling up the name of the staff person whose ID is in the service plan, I would like to also do some logic double checking that the service plan is active, and popping up a message if it is not. I know I need to use scripting to do the message and probably the logic at the end. But even without that step, I am unsure how to take the jump from the selected client ID, to then do the logic to the effect (forgive me, I'm thinking in semi-SQL pseudocode) Select LastNameFirstName from PERSON Where PERSON.StaffID = ServicePlan.StaffID and where ServicePlan.ClientID = Current Client ID This pseudocode is missing the bit about finding the active service plan, but in any event, understanding even a piece of how this works in filemaker would be very helpful!
  3. OK. I think I am doing that - using the ID, rather than the name. What tools does Filemaker provide to do the validation -- checking whether the current student's course plan is active -- to then determine what to show in other fields?
  4. OK. I've been reading on TOs and have gotten further along thanks to that. My tables and relationships are now set up. Now, I am trying to do some things on a layout and having some trouble figuring out what tools to use. I was wondering if anyone could suggest some to me. I have the user selecting a student name from a dropdown list of students. Each student has several course plans, of which only one has an "active" status (the course plan table has a status field). Once the student is selected, I want other fields to automatically populate with data from other fields in the course plan table. I would also like to do some logic -- pop up a warning, for example -- if the student does not have a course plan that is listed as "active." What tools could be helpful to do this?
  5. Thank you. So I would need a whole new calculation field in the table -- I can't just create that on the fly when I want to show the dropdown list?
  6. Hello, I am sure this is probably very simple, but I am having trouble figuring it out. I have a table that contains last name and first name as two separate fields. I would like to create a value list of the format "Last name, First name" so that someone can select from this dropdown list when editing records. How do I create a value list in this format?
  7. I like this solution, it appeals to my sense of being object oriented. I am getting stuck on one aspect of it though. So I have a "Person" table now, which I would like to be the supertype and have a "Professor" and "Student" subtype tables. They will link via PersonID, which is a serial number in the Person table and a foreign key for the Professor and Student tables. I am having trouble setting up the relationship in the graph, though. I have set up the Student/Person relationship and selected "Allow creation of records." But when I go to connect the Professor/Person tables, I get this error: "There cannot be more than one relational path between any two tables in the graph". What is going on?
  8. Thanks, this is really helpful! I'm working on it now. This is raising another question I have. I'm new to filemaker, but I'm a C programmer, so I guess I come at it with that mentality. I'm wondering, since I'm trying to define a field as a calculation doing this, to what extent can I put a series of statements in one of those field calculation things? Like, I'd really like to say something like: Set YearsWorked = xyz if (x) then { YearsWorked = YearsWorked - 1 } It seems like somehow I have to put the whole series of logic into one line in filemaker! Similarly, in the code that you pointed me to, they have this line: years = Year ( today ) - Year ( Start_Date ) - ( today < Date ( Month ( Start_Date ) ; Day ( Start_Date ) ; Year ( today ) ) ) I'm a little confused what that logic structure is with the "<" -- it sort of looks like an if statement, but there's no "if". Does Filemaker just default to "if"? Thanks so much for the tips.
  9. Hello, I'm trying to calculate the number of years and months between today's date, and a date provided ("MyDate"). Here's what I've got so far: Get(CurrentDate) - MyDate This returns me the number of days between the two dates. But when I try to do Year() of this statement, it doesn't get me the correct number of years (it's one too many). Hmm. What am I missing?
  10. Interesting. Well, the thing is, I need to track different information about the professors than the students -- so I need different fields within the professor/student records. Also, for the purpose that I'm creating, they're not going to overlap (given certain restrictions on the project). I suppose I could put a type field in the addresses table and then just have a single "person ID" field in the addresses table. But it still feels a little clunky to me having to hardcode types into the address table...
  11. Hello, I'm new to Filemaker, although I've programmed in other languages before. I am designing some tables for a database, and was wondering if I could sanity check the way I'm going about it with the forum. I have several tables in my database -- one that contains student records; one that contains professor records; etc. Each of these types of people needs to have several addresses associated with their record. So I've also created an addresses table. My question is regarding how to link the addresses to the people. Since the student and professor tables each have their own serial numbers (and I guess there might be overlap between the numbers since it's different tables), I can't just have a "person ID" field in the addresses table to link to those tables. And since there are a variable number of addresses I can't put an address ID in the student/professor records. So, I was thinking I would have to make a "student to address" table that just has the student ID and the address ID; and then a "professor to address" table that just has the professor id and the address id. It seems a little clunky, is there something I am missing? Thanks so much.
×
×
  • Create New...

Important Information

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