"for"-interval issue
AnsweredHello,
I'm facing this problem with a for-interval. I can't read the last item of the "@all of"-array. There are 2 "betrag". When I ask for betrag[0] it gives out something. But when i ask for betrag[1] it says, that the result can't be shown. This happens very often so it's not the first time. What did I do wrong?
var bezug = @All of Bezug;
var betrag = @All of ★ gezahlter Betrag netto;
var summe = 0;
var output = "";
for(var i = 0; bezug.length > i; i++){
if(bezug[i] != "Job & Plan Ausgabe Provision"){
output = summe + betrag[i];
}
}
output;
-
Hi Jan,
you don't do wrong anything. array[0] works, array[1] works not in the calculation field.
The last element in your array you get with :betrag.[betrag.length-1]
By chance, I've investigated on this problem yesterday and I've found some help.
This works, if the result of your calculation should be a string:String(betrag[1])
.Rainer
Please sign in to leave a comment.
Comments
5 comments