You need to iterate over all the fields, checking if they're positive or negative, and then adding them up. It's not complicated.
sorry - I didn´t realize it.
Thanks a lot !!!!!
sorry, but I thought: - Yes, this sounds good and logical!
But I think, I am making mistakes.
if ("Gesamt_Preis_01"<0;"Gesamt_Preis_02"<0;"Gesamt_Preis_03"<0;"Gesamt_Preis_04"<0); event.value = "";
sumif (Number("Gesamt_Preis_01")<0);Number("Gesamt_Preis_02")<0);Number("Gesamt_Preis_03")<0);N umber("Gesamt_Preis_04")<0)); event.value = "";
I hope my intension is not far away from the truth :-).
Thank you ....
You are trying to do in one expression something that needs lots of statements. Use an if statement to test each element in turn ("iterate over them").
Sorry ... I am not sure to understand, what you mean with "iterate over them" ....
Isn´t it correct, in "calculation" to mark all fields which have to be checked, then to check every Field in "validation" with:
if (a<0; b<0; c<0) ; event.value="";
or is it more like:
if (number(a<0); number(b<0); Number(c<0)) ; event.value="";
I am sorry, but I have tried this - without success :-(.
Thanks for a short help !!
First set a total to zero.
Write one separate line for each field, adding to the total only if the value is applicable.
To "iterate over" something is to do the same thing for each separate element in it, but to do the thing separately.
Hmmm .. :-),
probably I understand a bit more. Just to "set a total to zero"
every field has to be checked out ...
Do you mean it in this way .. ??
I gonna try this :-).
No, not really. Understand that setting event.value is what you do with the final result; you do it once only at the end.
Have a variable, we'll call it total.
You set a variable to zero in the usual way, probably with a var statement.
... ok. I think you are right. It seems to be a mixture of my better known Visual Basic and Excel functions ...
Well, I will try now to find out how I have to write it.
Thanks a lot for your patience.
I will tell you the result - maybe tomorrow.