Rushhour Posted November 10, 2005 Posted November 10, 2005 Hi, i need help... i need to read from a value list i named it department. And e.g. the user select IT dept, this field of mine called HOD will reference from value list and automatically input the HOD person name . e.g. Dept: IT (User just need to select), Head of Dept: Mr Jonathan(Auto input) so its like if GetField(IT) = true, compute Mr Jonathan on field HOD. Sorry im not really gd in script.. help needed.. thanks a lot..
Sanjai Posted November 10, 2005 Posted November 10, 2005 You can do the above without using a script such that the entire process could be automatic and the HOD's name does not have to be duplicated in both the files. Create a relationship using DeptName from your current file to the file which stores department information. Double click the HOD name field in your current table layout and then select the relationship from the drop down and then select the HOD field from the department table. When you would change the department name in your current table, the HOD name would automatically be reflected.
Rushhour Posted November 11, 2005 Author Posted November 11, 2005 oh you're right.. hm.. but that means i need to create another file just for this purpose isn't it.. is it possible do this just within itself so i can save 1 excess file as maybe it will looks untidy as more and more files get into my folder.. thanks a lot yeah...
Rushhour Posted November 14, 2005 Author Posted November 14, 2005 Hi, is there any way without creating another file?? thanks a lot..
LaRetta Posted November 14, 2005 Posted November 14, 2005 is it possible do this just within itself so i can save 1 excess file as maybe it will looks untidy as more and more files get into my folder.. You have vs. 7. Why are you creating FILES instad of TABLES within one file? Under some situations, the separation model is logical but you can do everything in one file - it's much easier! Only a veteran should attempt true separation; or someone updating solutions remotely. .. but that means i need to create another file just for this purpose isn't it.. You can create another table occurrence of your file called Department Heads and join them on Department Head using =. It is called a [color:blue]self-jon. As for whether you need another table, yes you should have Staff (with a field assinging Department and their Supervisor (Department Head) as another table. There is no benefit to cramming all fields into one table and you will eventually regret it. When in doubt, split it out. LaRetta
Rushhour Posted November 14, 2005 Author Posted November 14, 2005 Hi LaRetta, really thanks for your advice. I created another table with depthead & department field. I joined them with original layout of depthead & dept table. *Scenario* Dept Head: ??, Department: ?? I intend to do a popuplist for both fields, when user e.g. choose Mr Jonathan (IT Head), Department wll auto input 'IT' under department. Or when user choose 'IT' from the department popup list, under dept head it will auto input 'Mr Jonathan'. I tried look-up but still not able to figure this out. How should i go about linking both fields up? Thanks a lot Kelvin
Rushhour Posted November 17, 2005 Author Posted November 17, 2005 (edited) Hi LaRetta. Attach is the file. Can help see whats actually the problem.. really appreciate it.. I am presently on industry attachment. This company wish to convert all their stuffs to filemaker for easy access and documentation. But they do not have staff that are real good in filemaker and they did have few forms done with fm3. Now they wish to convert it to fm7 as supports IWP. And this is only my 2nd week doing with filemaker. Before that I never heard of filemaker untill my 1st day here my maganer throw me the fm7 guide book and fm7 application to learn it myself and start doing out forms. Really appreciated the advice and help from fm forums. Thanks a lot. Kelvin Overseas_Travel_Report_FMP.zip Edited November 17, 2005 by Guest Attached with file.
LaRetta Posted November 17, 2005 Posted November 17, 2005 Hi Kelvin, I explained that you can use a self-join but I suggested you have a staff table (depending upon your needs). Your file indicates that you need two REAL tables (and not just another table occurrence of Overseas Report table). You specified that you want everything in one file and I respect that; but you can have multiple tables within the one file (as I explained). I can assure you it's easier if you split it NOW before your design gets more complex. From this one file, I see two tables (probably more) Staff Each employee is a record in a Staff table. Minimum fields would be: StaffID (Auto-Enter serial or unique ID) FirstName LastName Designation Department Employees who are also Department Heads will have the Designation of "HOD". So you will have a HOD of IT and HOD of HR etc. Departments are IT, HR etc. Travel: Each DATE of Travel is a separate record in this Travel table. Minimum fields would be: TravelID (Auto-Enter serial or unique ID) FromDate and ToDate (replacing Duration) StaffID Cost Your field names indicate there should be other tables as well: Person(s), Objective(s) and Finding(s). BTW, you won't be able to successfully use these fields in calculations because of the parentheses so I suggest you remove them. If properly structured and joined on StaffID, you won't need Department or Department Head as fields in Overseas Report (as Sanjai mentioned) because you can simply place those Staff fields directly on your Overseas table. AND ... if properly structured, you won't even NEED conditional value lists because your people won't have to even select the Department or Department Head at all! Make sense? You've had this thing thrown at you ... been there done it. Most of us (when new) get well into an incorrect structure before we find out it strangles itself. You have a chance to correct it very early. We'll help you through it if you are open to adding a Staff table and setting this up right. LaRetta
Rushhour Posted November 18, 2005 Author Posted November 18, 2005 Hi LaRetta, thanks so much.. i will try to digest and work on it then show you again. As i am only able to access filemaker from the office so may need sometime.. can i ask you.. (and not just another table occurrence of Overseas Report table). <-- what does table occurrence means? if properly structured, you won't even NEED conditional value lists because your people won't have to even select the Department or Department Head at all! Make sense? <-- hmm sorry i dun understand this.. how the from going to know who going to write to then? Thanks so much Kelvin
LaRetta Posted November 18, 2005 Posted November 18, 2005 Hi Kelvin, A table occurrence is simply a representation of a table. You can have many representations of a table, each associted to other table occurrences (representations of same table occurrence or other TOs based upon different tables) so that you can use the SAME table in many relationships ... uh, well, I'm not explaining it very well. A TABLE can't be accessed. A TABLE contains data. You can only access a table (and its data) through a table occurrence. Table Occurrences are visuals displays of a table. how the from going to know who going to write to then? I'm afraid I didn't understand this at all. Remember that we have no idea what your solution is supposed to do. I guessed it was used by employees to track their travel. But with only one file (and only one table), it was hard to tell. I was hoping you would provide more detail for us. But I decided that the first task was to structure you correctly. Please explain the quoted portion above. LaRetta
Rushhour Posted November 21, 2005 Author Posted November 21, 2005 (edited) Hi LaRetta, I had figured it out.. Thanks so much. Kelvin =) Edited November 22, 2005 by Guest
Rushhour Posted November 23, 2005 Author Posted November 23, 2005 Hi all may i know whats the difference with halt script and pause script? how to judge when and which should we use it? thanks a lot.. Kelvin
Recommended Posts
This topic is 6943 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 accountSign in
Already have an account? Sign in here.
Sign In Now