Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8420 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

crazy.gif" border="0

  • 3 weeks later...
  • Newbies
Posted

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

Posted

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.

Posted

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.

  • 2 weeks later...
Posted

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

shocked.gif" border="0

This topic is 8420 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.