Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Filtered Drop Down List


pademo60
 Share

Recommended Posts

First of all, yes I am a newbie and this is my first post.

 

Secondly, PLEASE, PLEASE don't send me to another thread. I have been on other forums to ask this question and they keep sending me to other threads. But when I try to understand them it doesn't make sense to me.

 

So what I am hoping for is someone, anyone who can spell it out for me in this thread.

 

Here we go:

 

Our company has:

 

Employee Table: EID (Primary Key), Fname, Lname, fk_SID (foreign key from Status Table), etc

Status Table: SID (Primary Key), Status Name, Status Code

Classroom Table: CID (Primary Key), ClassName, fk_EID, etc

 

Our company has employees who can be Students Level 1 - 4, or they can be Teachers Level 1 -4,

 

An example of an Employee Table:

EID1, John, Doe, SID08 (which = Teacher Level 4)

EID2, Anita, Friend, SID01 (which - Student Level 1)

 

What I would like is a layout that has:

 

1)Drop Down List for Teachers only (because there is only one teacher per class)

2) Portal for Students which can be selected (because there can be up to 10 Students per class)

 

IF I have the above right, I think I need a calculated field which I can then use a value list for the teachers. Is this right?

 

IF so, how do I set this up, (i.e. which windows do I pop up? which tab do I click on? What calculation do I write? etc.)

 

I know all of this above may sound silly, but I'm over 50 and pulling out what little hair I have left. I can write this out in "C" language or MYSQL using a "WHERE" clause but I can't, for the life of me, figure out how to do this in Filemaker Pro 11 Advanced.

 

PADEMO60

Link to comment
Share on other sites

Sigh. This is exactly what I was hoping wouldn't happen. The "Similar Threads" have numerous problems. One says,"Warning: This is an Old Thread

This discussion is older than 365 days. information contained in it may no longer be current.

Not only that the "Threads" it points to don't work either.

The other "Similar Threads" point to versions earlier than Filemaker Pro 11 Advanced. Maybe it's the same, I tried one suggestion but it didn't work.

 

PLEASE, PLEASE, could someone just post an answer on this thread showing or stating which windows have to be open, what tabs clicked, etc. Yes, it is very pedantic, I know.

 

I'm sure this is a "Filemaker 101 stuff" but Please someone, help out an old guy down on his luck!

Link to comment
Share on other sites

Our company has employees who can be Students Level 1 - 4, or they can be Teachers Level 1 -4

 

OK. First things first. You either already do, or do NOT yet, have a field in the Employees table that indicates whether a given Employees record is the record of a TEACHER, as opposed to a STUDENT. Let's assume for now that you do NOT. Create one: a text field that either contains the word "Teacher" or else contains the word "Student", selected from a radio button value list or a dropdown value list. Then fill in the appropriate values for all your existing records. Let's call that field "Role". If you already have such a field, please understand that when I say "Role" it should mean the field you've already got instead.

 

1)Drop Down List for Teachers only (because there is only one teacher per class)

 

Create a new field, calculation field, result type "text" defined as Case (Role = "Teacher", Fname & " " & Lname). Let's call that field TeacherName.

 

Now create a new value list showing values from the field EID also showing values from TeacherName. Invoke the option of sorting by the second field, TeacherName. Now EIDs of records that do not have a TeacherName will not be included. Voila. Dropdown list for Teachers only.

 

 

) Portal for Students which can be selected (because there can be up to 10 Students per class)

 

 

I think you are dashing up a dead end alley here. I understand you don't want to be referred to another thread, but I am thinking you want there to be classes which are this semester's classes which are taught by a certain teacher and have certain students in it who may also be students in someone else's classes... if not now, then soon enough. So if that is the case you need to understand that you're asking for a simple guide to building your own internal combustion engine but you don't want to be referred to existing diagrams of how pistons work inside of cylinders.

 

Ignoring that, though, a portal, in order to exist, has to be a portal TO something. Another table or at least another table occurrence. And the layout you are on has to also be showing records FROM some table. The first dropdown value list you asked for can be attached to anything, anywhere, but selecting something FROM that value list presumably fills in a FIELD with the chosen EID field value and neither you nor I are as of yet clear on what field you are filling IN with that EID. Is it a new table of Classes, where each Class has a teacher? if not, what is it? Anyway, a portal can be set up that shows ALL THE STUDENTS from the Employees table. And you can "select" any given one of them. A portal of the students who are in THAT TEACHER'S CLASS would be a different thing. Selecting a student from the list of all existing students in order to ADD them to THAT TEACHER'S CLASS would be yet a different thing. Since you didn't explain, I'm leaving you on your own until you explain or ask or elaborate.

 

To make a portal from any table whatsoever on any layout whatsoever that shows all the students in the Employees table:

 

a) first create a new field in Employees, calculation field, result type "number", defined as Case (Role = "Student", 1); let's call that field OneIfStudent.

 

b) create another new field in whatever table your current layout is "showing records from", whether it also be Employees or instead is some other table, defined simply as 1, calculation field, result type number, let's call it "One".

 

c) create this relationship from the table of your current layout, which I'll call YourTable, and Employees (or a new table occurrence of Employees as need be) like so:

 

YourTable.........Employees

 

One = OneIfStudent

 

 

Now make a portal to Employees on your layout. If your layout already is an Employees layout, you will have needed to create a new tab le occurrence of Employees in order to set up the above-described relationship, so let's say the new table occurrence is named EmployeeStudents. In which case you make a portal to EmployeeStudents.

Link to comment
Share on other sites

Thanks Ahunter:

 

 

OK. First things first. You either already do, or do NOT yet, have a field in the Employees table that indicates whether a given Employees record is the record of a TEACHER, as opposed to a STUDENT. Let's assume for now that you do NOT. Create one: a text field that either contains the word "Teacher" or else contains the word "Student", selected from a radio button value list or a dropdown value list. Then fill in the appropriate values for all your existing records. Let's call that field "Role". If you already have such a field, please understand that when I say "Role" it should mean the field you've already got instead..

 

You are correct, sir. I simplified this probably a little too much for what I needed.

 

Firstly, your solution worked perfectly!

 

Secondly, there are more tables involved in this scenario since obviously there is a many-to-many relationship with Students having more than one Course and Courses having more than one student. It also involves having a Teacher - Level 2, can only teach a Level 1 or 2 course and not allowed to teach Level 3 or 4 courses.

 

But again, your solution has given me enough to be able to work through the rest of it. Thanks again!

 

PADEMO60

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use