Todd Dignan Posted November 15, 2002 Posted November 15, 2002 I have one field that has three repetition. I want to set repetition 3 with repetition 2 and the repetition 2 with 1. Set Field ["field"-3. "GenRepetition,(field,2)"] Set Field ["field"-2. "field"] In my tests it will not work in 5.5 OS X or 9.x. Insert calculated result does not work either. Is this a bug??? Help.
harryk Posted November 15, 2002 Posted November 15, 2002 Yes, this might be some kind of bug, or at least for some reason FM does not do. The direct reference in a setfield to a getrepetition does NOT work when a repeated field must be set. But a workaround is to capture the getrepetion in a global, and then do the setfield. It's one step extra but it works. (I encountered the same too). Set Field [gTemporaryfield "GetRepetition,(field,2)"] Set Field ["field"-3. "gTemporaryfield"] Set Field ["field"-2. "field"] Harryk
CobaltSky Posted November 15, 2002 Posted November 15, 2002 Hi Harry, The method you're suggesting is in fact the work-around that FMI recommend in their Kbase article on this subject. But there is a better way. A little while back the inimitable dj pointed out that you can use: Set Field ["YourRepeatingField"-3, "GetRepetition(YourRepeatingField, 2) & "" "] The little appended 'null' on the end apparently has the mysterious effect of distracting FM for just long enough for it to 'forget' that it has a bug with repetitions. Try it out - it works!! It's still a workaround, maybe, but it sure beats decanting your data all around the place between globals and back (not to mention making the scripts easier to read and a *lot* shorter!
harryk Posted November 18, 2002 Posted November 18, 2002 >getrepetetetetetition 'bug' Good tip! By the way, are there any issues you d
CobaltSky Posted November 18, 2002 Posted November 18, 2002 Hi Harry, I could be 'funny' and say "I don't know"... But seriously, I appreciate the compliment, but knowledge is an ocean, and the human mind is a leaky cup. We're all learning, yet there's always much much more to know!
harryk Posted January 22, 2003 Posted January 22, 2003 Poster: CobaltSky Subject: Re: Using Set field with repeating fields. Hi Harry, The method you're suggesting is in fact the work-around that FMI recommend in their Kbase article on this subject. But there is a better way. A little while back the inimitable dj pointed out that you can use: Set Field ["YourRepeatingField"-3, "GetRepetition(YourRepeatingField, 2) & "" "] It's a while back, that you gave me this answer Ray, I remembered it, and the occasion occurred to try it out, but with me, this does not work.. A brief summary of the problem: a setfield of a repeating field with another repeating field does not work, despite the add of the & "". Of course there are workarounds (apart from the fact that I will tackle my problem another way, with portals), you can use a temporarily global as an 'in between'. As you referred to the unimitable dj, having the solution to this tiny problem, have one of you perhaps any comments on this? Thanks Harryk
djgogi Posted January 23, 2003 Posted January 23, 2003 In order to make it works, yoy'll need to use proper sufix: "" for text, +0 for nums ect. Dj SetRepetition.fp5.zip
Recommended Posts
This topic is 8342 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