Basically, I have three fields in a Competitions Database that set the values for each type of result (Win, Tie, Loss) in each Competition. All values are set with a "+" and "-" button for each field, which uses a single script for each field. A script parameter for the button determines if the button increases or decreases the value (only ever by 1).
Instead of having three scripts, I'm hoping to streamline things, so that the Script calls another parameter when selected that tells is which field needs to be edited.
Then I have another script that verifies the value.
The conditions for verification are;
- Points for a Win (e.g. 2) can be increased to any value. It cannot be decreased below the existing value for a Tie
- Points for a Tie (e.g. 1) can be increased to any value below the existing value for a Win. It can't go below the existing value for a Loss
- Points for a Loss (e.g. 0) can be increased to any value below the existing value for a Draw. It can't go below the value of Win multiplied by -1
Any ideas out there.