Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Can you help?

I am trying to use a calculation to populate a repeating field. I did it with a script... and now I want to do it as a calc to speed up the process.

I have a file name... I'm trying to identify all the positions of the character / in the file path. So I have a repeating field with 15 repeats. I set the field as a calc... and then the first calc is

Position ( server_string ; "/" ; 0 ; 1 )

Works great, now I want repeating field 2 to grab the position of the 2nd instance, repeat 3 to grab the position of the 3rd instance and so on.

I know how to get data from repeating fields, but how do I put the data in it as part of the calculation?

thanks for any help.

steve

Posted

yep, that is the problem with repeating fields. there's GetRepetition, but there's no SetRepetition!

you could poke around some more with the Extend function, only to find yourself wanting to add some more repetitions later, or changing the logic. THEN, you might eventually come to the point where all this stuff becomes hard to read and maintain. that's why just about everybody will tell you to add a related table instead.

most people use repeating fields only to store some graphics for interface usage or similar things, but not data that needs to be manipulated.

just my 2c.

stefan

Posted

Position ( server_string ; "/" ; 0 ; 1 )

Works great, now I want repeating field 2 to grab the position of the 2nd instance, repeat 3 to grab the position of the 3rd instance and so on.

Try =

Position ( server_string ; "/" ; 1 ; Get ( CalculationRepetitionNumber )  )

Posted

Thanks for the heads up. Using the calculationrepeitiionNumber is doing the trick. Just FYI, I'm not using it for dynamic data... but am using the field to break apart a long path name to feed data to individual calculation fields that connect to the related tables.

Thanks for the tips gang.

s

This topic is 4830 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.