Newbies ChMisho Posted November 17, 2005 Newbies Posted November 17, 2005 Hi, I have two tables Table1: test Fields: A - auto serial number, B - numeric calculation Field (testRel::data + 3) Table2: testRel Fields: ARef - references test::A, data - numeric data field I want to use one layout created for table 'test' and I want to fill in just testRel::data field and to get the calculation on test: which seem pretty simple BUT it doesn't work I'm attaching the database and you can try to create a new record. It shouldn't be a tough thing to do, but obviously I'm missing something. I tried in FileMaker 7 and 8 but it works the same way. Regards ChMisho
mr_vodka Posted November 17, 2005 Posted November 17, 2005 You currently hasve it set up as a nubmer field with calcuated result. This will update when you change the match field (either A or ARef) that is in your relationship. You may be better off using a calculation field instead.
Newbies ChMisho Posted November 17, 2005 Author Newbies Posted November 17, 2005 Thank You, Calculation field would help, but I need a field that I'll to modify later and this numeric calculation is only the default value for the field. So i created test: as a calculation and a field test::C that is a Numeric that is getting the default value from test: (this time no relationship involved), but it doesn't work. And it sounds a little bit silly to have to change the primary+foreign key (nobody would update these) in order to get something recalculated for default value. I'm attaching the modified database Regards ChMisho
kam Posted November 17, 2005 Posted November 17, 2005 There's a couple ways to handle what I think you're asking for. (Unfortunately, if FMP was event-driven we wouldn't have to resort to so many workarounds ) See the attached databases. One method adds a calc field to table 1. When a number is entered into field 'Data' it displays that value plus 3. If the user overrides this (by putting a value into field 'B') then it displays the number spec'd by the user. Use this calc field for whatever purpose you intended for the original 'B' field. The other method is cleaner because it doesn't add any fields. Rather, we move field 'B' from Table 1 & put it into Table 2. Using the Auto-Enter calc feature, whenever a number is entered into field 'Data' it gives you the number you ask for. This method uses a trigger & could be used to change the 'B' number at anytime if you deselect the option 'Do not replace existing value for field...." Although this is the cleaner method, moving field 'B' to the other table may not be an option depending on the design of your database. So here's 2 methods, but I'm sure there's others. Good luck! test.zip
Newbies ChMisho Posted November 17, 2005 Author Newbies Posted November 17, 2005 Thanks, Obvoisly I'll have to change the design or have a script to do the job for me onBlur of the field (which includes a plugin touch) I'm just wondering why Filemaker will have it in the GUI enabled, when it will not work. I was expecting to get a warning at least Regards ChMisho
Recommended Posts
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