I have this following dropdown list of Department
I want that if I any of the department it will automatically their corresponding code.
Do you have a table of these departments and codes from which you can lookup the code (& create the value list)?
The two fields are on the same table (Invoices).
The classic solution for this is to use a "use values from field" value list where your code field supplies values for the first field of the value list and your Department field is selected as the second field. Your value list can then be set up to show the department name, but actually enters the department code. If you use a pop up menu format option, your field will always show the department name, but actually stores the code.
This assumes that you have a table where one field has the department name and another the department code, which is why beverly asked if you have a table that stores these values as that's what you want to refer to in your value list set up.
Im trying to use case but its not letting me continue when I hit the OK button the error that Im getting is "The Specified field cannot be found"
Department = QA & Compliance ; "10" ;
Department = QC LAB ; "20" ;
Department = Production ; "30" ;
Department = Formulation R&D ; "40" ;
What I am suggesting does not use Case. It just uses a value list as that handles the entire process needed.
The error you are getting is because you haven't enclosed the text to the right of the = operators in quotes and thus FileMaker thinks that these are field names when they are not.
Attached is my output.
Yes, I understand you want to FILL those fields in your Invoice table layout. Do you have another table with these values that can be used as a "lookup table"?
No. Only One table.
I am returning your file to you with modifications.
a) I disabled the auto-enter calculation
b) I set up an Invoices table
c) I set up a value list for this data
d) I showed several different ways to display the department name.
Retrieving data ...