Some clarification about your problem would be helpful. What fields are being written to and read from? What triggers the script (or calculation) to run, and when?
One thing to remember with FileMaker in general is that there are calculations, and there are scripts, and they are two different things that operate different ways. (Though many script steps allow you to specify what they do using calculations.) Calling anything a "function" typically means you're referring to something in the calculation engine, and calling something a "script step" refers to something for the script engine. "If" exists as both a calculation and as a script step; they do pretty similar things, but in different contexts. The If calculation function and the If script step both are potentially applicable to what you're talking about (so are the Case calculation function and Else If script step), but you can't set a field with a calculation. (You can define a new field as a calculation, though.) Setting a field generally requires a script using the Set Field script step. Answering the questions I started with will help guide what that script might look like.
Let me use an example to explain:
3 mem. lvl. (member levels). RM, AS, & ASS. All 3 levels are RM but they also are a step above. So, AS is an RM & AS and an ASS is a AS & RM. I hope that makes sense.
They are paid different amounts based on their membership level. So when an RM wins they are paid only the RM amount, the other two amounts roll over. If an AS wins they get RM plus AS plus AS roll over. If an ASS wins they get paid RM + AS + AS roll over + ASS + ASS roll over. Then the roll over resets back to zero.
I've tried using scripts, and calculations. Would it make more sense to just use buttons with a script that is a calculation?
The levels made enough sense already. What are your fields? What tables are they in? What scripts and calculations have you tried? Are the scripts you've tried run by a button, a server schedule, or a script trigger?
an ASS is a AS & RM. I hope that makes sense.
it sure does.
To you an other english speakers the levels and their hierarchy may make sense, but to me and others who don't speak english natively, it doesn't. What does "roll over" exactly mean? Is "roll over" a verb or a subject? Does it mean re-invest? As in it's their money, but they are not payed?
Without really understanding your problem at this point, I would like to comment to it anyway:
Whenever I encounter a logical problem, I create a so called truth-table from which I derive my logical formula, maybe that is a helpful method for you too. An if- or a case-statement should be possible to use here :-)
How do you determine in FileMaker who the winner is? Do you simply click a button next to their name? Are you Manually just entering the winnings amount? This is a solvable problem but I think it is really more of a relationship issue than a script step or calculation issue.
Think of rollover like a cellular phone plan. You are on Plan "A" with your cellular carrier and your plan gives you 1000 minutes per month. Some months you only use 800 minutes so the cellular carrier rolls over the other 200 minutes to the next month so that you now have 1200 to use.
Hope this helped.
That is clear, thank you!
Well guys I figured it out. I have 2 boxes for each week, one for AS and one for ASS. I have a button for each level, RM, AS, & ASS. The buttons run a script. For RM it adds the AS payout (A field) to week one field. The following week if an AS wins it adds RM + AS + week one AS roll over and clears the field AS week one. ASS roll over does the same adding but doesn't clear.
It may not be the most efficient way but it works.
Thanks for trying to help me on this.