November 15, 200223 yr 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.
November 15, 200223 yr 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
November 15, 200223 yr 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!
November 18, 200223 yr 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!
January 22, 200323 yr 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
January 23, 200323 yr In order to make it works, yoy'll need to use proper sufix: "" for text, +0 for nums ect. Dj SetRepetition.fp5.zip
Create an account or sign in to comment