October 11, 200124 yr I’m having some issues trying to populate a repeating field from a repeating field. Example field “s” repeats 4 times and field “j” repeats 4 times I want to set field “j” to = field “s” via a script I’ve tried the Set Field [“s-3,Get Repetition(J,3)”] and I just cannot get this to work except for the first reparation. Can someone please try and see if they can get it to work, I’m totally at my wits end, and thinking this maybe a bug in the program. I’m using ver5 Thanks Ron Bascom
October 29, 200124 yr Newbies Hi Ron, I don't think this simple programming device is possible in Filemaker scripts. The work around is to use and intermediate temp field i.e. SetField ( temp, GetRepitition(3, field) SetField (result-3, temp) just remember to make the global temp the same type as the repitition fields. Hope this helps Michael Dalton
October 29, 200124 yr This is one of the reasons why repeating fields are "discouraged." Related fields and portals are much, much more flexible and easier to work with.
October 29, 200124 yr You can't use looping when trying to do what you stated. For every field on the left side of the SetField statement, you need an individual SetField: SetField(j-1,GetRepetition(s,1)) SetField(j-2,GetRepetition(s,2)) etc. It's pretty clutzy and a pain to work with, but at times it has its uses.
November 8, 200124 yr Author Thank you so much for the replies. What we did as a workaround was to set a non-repeating field to temporally hold the data, then set the repeating field from that data. What should have been a couple of lines of script ended up being over 200 :-( P.S. I was beginning to wonder what was going to ware out fist the mouse button or my click finger. Ron Bascom
Create an account or sign in to comment