Guest_imported
New member
- Jan 1, 1970
- 0
Naith,
Yesterday you helped me with that nested if variable statement, as follows (ignoring the declarations): -
If {FLD1} = 100
Then
If {FLD2} = "A" Then Var1 := Var1 + {FLD3}
Else
If {FLD2} = "B" Then Var2 := Var2 + {FLD3};
If {FLD1} = 200
Then
If {FLD2} = "A" Then VarA := VarA + {FLD3}
Else
If {FLD2} = "B" Then VarB := VarB + {FLD3};
That was great but I would now like to show a running total value as well and cannot seem to get it to work using this approach - can you please help?
Is this related to the absence of the "ELSE Var" syntax at the end of each line? The closest I seem to be able to get is as follows: -
If {FLD1} = 100
Then
If {FLD2} = "A" Then Var1 := Var1 + {FLD3} else Var1
Else
If {FLD2} = "B" Then Var2 := Var2 + {FLD3} else Var2;
If {FLD1} = 200
Then
If {FLD2} = "A" Then VarA := VarA + {FLD3} else VarA
Else
If {FLD2} = "B" Then VarB := VarB + {FLD3} else VarB;
However this does not work for the "If {FLD1} = 200" clause and it will not allow me to add more than 2 lines into the secondary {FLD2} clause.
Yesterday you helped me with that nested if variable statement, as follows (ignoring the declarations): -
If {FLD1} = 100
Then
If {FLD2} = "A" Then Var1 := Var1 + {FLD3}
Else
If {FLD2} = "B" Then Var2 := Var2 + {FLD3};
If {FLD1} = 200
Then
If {FLD2} = "A" Then VarA := VarA + {FLD3}
Else
If {FLD2} = "B" Then VarB := VarB + {FLD3};
That was great but I would now like to show a running total value as well and cannot seem to get it to work using this approach - can you please help?
Is this related to the absence of the "ELSE Var" syntax at the end of each line? The closest I seem to be able to get is as follows: -
If {FLD1} = 100
Then
If {FLD2} = "A" Then Var1 := Var1 + {FLD3} else Var1
Else
If {FLD2} = "B" Then Var2 := Var2 + {FLD3} else Var2;
If {FLD1} = 200
Then
If {FLD2} = "A" Then VarA := VarA + {FLD3} else VarA
Else
If {FLD2} = "B" Then VarB := VarB + {FLD3} else VarB;
However this does not work for the "If {FLD1} = 200" clause and it will not allow me to add more than 2 lines into the secondary {FLD2} clause.