4 Replies Latest reply on May 17, 2017 10:20 PM by chappers

# FM11 script help (at least I think it is)

I have a competition board where in one category my students work out the amount of copper in a sample - the closest one is ranked in a field called "Copper Rank".  I have a field called "Copper points" and I need the first ranked copper (that displays "1") to be given 3 points, like wise I'd like second place to receive "2" points and third place to get "3" points - all this should happen in the "Copper points" field.

My ranking system works - I'm just not sure how to get the "Copper Rank" field to allocate points to  the "Copper points" field.

I could enter the points by hand but .......this is the last bit I have to do.

Many thanks in advance

• ###### 1. Re: FM11 script help (at least I think it is)

Might need a little more on your relational structure to help with this question. For example, do you have more than one table? If so, what is the relationship between the tables. I'm imagining a Student and Competition table at the very least but want to make sure. Thanks.

• ###### 2. Re: FM11 script help (at least I think it is)

Thanks for taking time to help.

It's only one table with two layouts. One layout for students to enter their answers and one where the  answers and points appear.

• ###### 3. Re: FM11 script help (at least I think it is)

It sounds like you want to have each Copper Points field in the record filled in automatically based on the value in the Copper Rank field in the record.

If that is the case, you could use a calculation like the following.

Case(

Copper Rank = 1; 3;

Copper Rank = 2; 2;

Copper Rank = 3; 1;

0  // This is the value for any other value of Copper Rank

)

This could be applied with one of the following:

• a looping script (via Set Field)
• Replace Field Contents... via Calculation
• Auto-Enter value in the Options... of Copper Points
• changing Copper Points to be a Calculation field

-Tom

1 of 1 people found this helpful
• ###### 4. Re: FM11 script help (at least I think it is)

I would just like to say a big thank you. Its funny really the answer was staring me in the face.

This worked perfectly.

Thank you to you and anyone else you tried to help.

Chappers