duggggy Posted January 4, 2008 Posted January 4, 2008 (edited) Hi, I'm fairly new to filemaker and have been reading the forum for a while. Thanks everyone for the great help and advice contained here. I have come a cross a problem, though that has me stumped so far. I wish to create new records in a table B that increment by 0.1, related to a record in table A. When a different record in table A creates new records in table B, I wish these to increment by .01 beginning at .01 again. For example. In table A record no 200, is related to records 200.01, 200.02 and record 200.03 in table B. In table A record 201 is related to record 201.01 in table b. In table A record 202 is related to record 202.01 and record 202.02 in table b. Its the .01, .02, and .03 to be incremental in table b, but reset when they relate to a new record in table A I'm using filemaker 8 on a mac OS 10.4 Can anyone help point me in the right direction? Cheers Edited January 4, 2008 by Guest
Orlando Posted January 4, 2008 Posted January 4, 2008 Hi duggggy, You would need to create the related records using a script and set the ID based on a calc, I would also have a separate UniqueID for the related records as well as the generated one. I have put together a quick demo file for you to have a look at which, if I have read it correctly, should answer your question. I have put comments in the script which I hope explain it enough. I hope this helps. Regards Orlando Record_Increments_TEST.zip
comment Posted January 4, 2008 Posted January 4, 2008 The usual warning: http://www.fmforums.com/forum/showpost.php?post/273995/
duggggy Posted January 4, 2008 Author Posted January 4, 2008 Thanks for the prompt reply and help. Far more than I was expecting - much appreciated. I will take a good look at this, and I'll let you know how I get on. Cheers
duggggy Posted January 7, 2008 Author Posted January 7, 2008 (edited) Hi, Thanks for the file. I have had a good look through and I see how you have done it. Unfortunately, even though I understand how it works, it doesn't seem to work for me, and I can't see why not. I have attached the file, with the results that I get when I use it. I take it the existing data in the file is from yourself testing it? Does it still work for you? Record_Increments_TEST.fp7.zip Edited January 7, 2008 by Guest
duggggy Posted January 7, 2008 Author Posted January 7, 2008 Hi, I have just tested the same file in Filemaker Developer 7, which I have on a different machine and this works perfectly. Therefore is there something in the script which works in Filemaker 7, but not 8?
duggggy Posted January 7, 2008 Author Posted January 7, 2008 I have been messing with the file in Filemaker 8, and I have got it to work, by creating 2 global fields. 1 for each part. In the original, the script would not change the value in repetition 2 in the global field, when using filemaker 8. This probably not the best solution, but it does work. Thanks for your help in pointing me in the right direction. Cheers Record_Increments_TEST.fp7.zip
Recommended Posts
This topic is 6225 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