creart Posted December 11, 2003 Posted December 11, 2003 Hi, I don't know where to begin with this.... I let my user make a selection of records based on name - from this selection he can check the records he needs; what I want to do then is copy the id-numbers of those records into repeating fields of one record in an other database.... I can run a summary on the amount of checkmarks he set so I know how many there are, but can I set the number of repeating fields upfront and then how do I fill those repeating fields?? If it's possible to set the repeating fields, then how do I run the (summary number) amount of times to fill the repeating field?: Is that possible? Any ideas? I'm using FM 5.0 by the way
dbruggmann Posted December 11, 2003 Posted December 11, 2003 Yes, it's possible, but it is a hassle (see attached sample). Because of the repetition field you can't use looping scripts. That means, you will have to predefine how many idNumbers at the maximum ever need to be copied by a user. Thats the number of SetField script steps you have to manually include in your script. For repetition fields it works basically: Set Field ["RepetitionField"-X, "id-number"] ==> -X means: X. repetition of RepetitionField If there are only a handful of records every time, this works. But if you have dozens of idNumbers to copy, you should redesign your database. Repetition fields are also a nightmare if you ever want to report on them or use them in other calculations or scripts. CopyToRepetition.zip
Ugo DI LUCA Posted December 11, 2003 Posted December 11, 2003 Hi, This is partly true. You can set a repeating field involving a loop script. This was very well documented by Ernst in the Sample section. I'm currently succesfully using it for many purposes, the main being a statistical file. Still, you'd need to have the max number of repeats set. You may also set a specific repeat to the specific value of another repeating field. At the end, these undesirable repeating fields become very handy, and appears in some situtation to be quicker than any other related calculation and scripted calculation scenario. Just my 2 cents.
creart Posted December 11, 2003 Author Posted December 11, 2003 Thanks for your fast responses! I will look into your suggestions. I will only allow a maximum of 5 chosen records so that means maximum of 5 repeating fields - but maybe you're right and I have to redesign some stuff thanx!!!
Recommended Posts
This topic is 7656 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