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

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

Recommended Posts

Posted

Good morning. I am building a sports league results listing with a large number of teams.

I am trying to use a variable in 'Set Field By Name' to write another variable into a field. My field is a repeating field i.e. MayGro[1]. I use a routine to calculate the first 6 letters of the field name which I call $homeaway and then append the repetition number. My line looks something like - Set Field By Name [$homeaway & "[1]" ; $r1] (where $r1 is a variable holding the home team's points for this game). It doesn't work.

I am a real novice at Filemaker and am hoping that someone will be able to see where I am going wrong.

Also why does the 'value' step in the Set Variable routine say that the 'Calculated value must be text' although the value I am using is definitely a number.

Many thanks

Graham Keeley

Posted

Hi

I've done some reading and it would appear that it's not possible to use a variable in the 'Set Field By Name' script step. What a shame, will turn what was a short script into a very lengthy one.

Cheers

Graham Keeley

Posted

My line looks something like - Set Field By Name [$homeaway & "[1]" ; $r1]

That should work - so most likely, you're not calculating the field name correctly.

However, I would suggest - no, make that strongly suggest - you use records in a related table instead of repeating fields. When it comes to sorting and summarizing, repeating fields are impossible to work with.

Also why does the 'value' step in the Set Variable routine say that the 'Calculated value must be text' although the value I am using is definitely a number.

That's a good question.

Posted

I've done some reading and it would appear that it's not possible to use a variable in the 'Set Field By Name' script step.

Get better reading material...

Posted

Hi again

Well I seem to have cracked it. i have added the table name and the line now looks like this

Set Field By Name ["Results_Table::" & $homeaway & "[2]" ; $r2]

and that does the trick.

Cheers to anyone that looked at the problem.

Thanks

Graham Keeley

  • Like 1

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