This content has been marked as final.
Show 3 replies
-
1. Re: Calculation suggestion. Can anyone help me?
John.Kordas Jul 2, 2006 9:55 PM (in response to John.Kordas)Ok I have the following in the special column under click:
this.rawValue = spetot.rawValue
Now if there is a figure in the Special Items Total (spetot) it will appear in the field if I click on it. What would be the if statement that would tell it to go back to 0 if one of the other Special fields is clicked?
Should the script start with:
var mayDoc = event.target;
this.rawValue = spetot.rawValue
Any suggestions? -
2. Re: Calculation suggestion. Can anyone help me?
John.Kordas Jul 2, 2006 10:50 PM (in response to John.Kordas)Ok I've gotten a little further and if someone could tell me if this is the correct way to do it I would be very grateful.
On the Monday special field I have the following script running on the click option:
if (this.rawValue == 1)
{
sunspe.rawValue = ""
monspe.rawValue = ""
tuespe.rawValue = ""
wedspe.rawValue = ""
frispe.rawValue = ""
satspe.rawValue = ""
sunspe.rawValue = ""
} else {
sunspe.rawValue = ""
monspe.rawValue = spetot.rawValue
tuespe.rawValue = ""
wedspe.rawValue = ""
frispe.rawValue = ""
satspe.rawValue = ""
sunspe.rawValue = ""
}
On the Tuesday special field I have the following script on the click option:
if (this.rawValue == 1)
{
sunspe.rawValue = ""
monspe.rawValue = ""
tuespe.rawValue = ""
wedspe.rawValue = ""
frispe.rawValue = ""
satspe.rawValue = ""
sunspe.rawValue = ""
} else {
sunspe.rawValue = ""
monspe.rawValue = ""
tuespe.rawValue = spetot.rawValue
wedspe.rawValue = ""
frispe.rawValue = ""
satspe.rawValue = ""
sunspe.rawValue = ""
}
Now this seems to work. If I have a total at the bottom of the form which is just a FormCalc Special Item 1 + Special Item 2.
If I click on the Monday Special field the total appears (after I click away from the field). If I then click on the Tuesday Special Filed the Monday field is cleared and the Tuesday Field now has the figure shown in the total.
Have I done this correctly? -
3. Re: Calculation suggestion. Can anyone help me?
John.Kordas Jul 3, 2006 3:24 PM (in response to John.Kordas)Is there a way to have the figure update if the spetot figure is changed?
Would I need another if statement?

