Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

I have been struggling over something that I am sure has an easy solution. I am trying to create a filtered value list for the employees table. I have a table with active and inactive employees, some of whom are salespeople and some are not. I have created a calculated field to determine which employees are active salespeople and created a self-join in the employees table based on the calculated field on one side and the primary key on the other. I want the value list to show only those active salespeople, and I want to record the primary key for the employee, but only show the full name on the value list. I have tried every possible combination, including global fields for the calculation and nothing seems to work. I have isolated the employees table and shown a couple of the value list tries and relationship tries. Any help would be appreciated.

Filtered_Employees_Copy.fp7.zip

Posted

In order to show a filtered value list, you need another table. I've added a new table to this demo so you can see how a filtered value list is created.

I see that you are prefixing your EmployeeID with "EE0". It's not the best approach. See this thread as to why: Serial IDs and Prefixes If you need "EE" before the serial, create a dsp_EmployeeID that is a calc. This is not used in relationships, though.

Also, I've renamed some of your fields. I follow the FMI naming conventions on keys, using "__kP_" as a prefix for all primary keys. That's two underscores preceding the "kP". This will sort it to the top when sorted alphabetically.

Filtered_Employees2.fp7.zip

  • Newbies
Posted

Thanks for the reply. As for the naming conventions, this table was one of the first I added to the database. The others all follow your examples. I am also going to be removing the EE from the ID because I will eventually be importing data from a Microsoft Access database that has a number as the ID, so this is just temporary.

As to the solution. I can see that it works and I thought of something similar with using a global field as a constant of one and then relating that to the status field. That didn't work. One question, on your solution -- your additional table has 3 fields - an ID, the constant and then the employee ID. How does the employee ID field on that table get populated? What am I missing?

Posted

The EmployeeID is populated when you select an Employee from the popup menu. The field is set to use a value list. The value list is defined to consist of two fields, ID and Name, but only display the second field.

Look at the Value List definitions.

This topic is 5804 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
×
×
  • Create New...

Important Information

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