I'm trying to add a counter to a form that tells the user how many values have been selected from a list box... I tried adding a FormCalc formula to a calculate event in the "counter" field as follows:
count(form1.#subform[0].ListBox1.rawValue)
But for some reason it's not adding them up. It only gives me a value of 0 when none are selected, or 1 where any number of selections are made.
Can anyone help me out?
Thanks in advance
Solved! Go to Solution.
Views
Replies
Total Likes
Try putting this in the calculate event of your counter field:
var num=0;
for (var a=0;a<ListBox1.items.nodes.length;a++){
if (ListBox1.getItemState(a))
num++;
}
this.rawValue=num;
Exit the list box and the field will calculate.
Kyle
Views
Replies
Total Likes
Try putting this in the calculate event of your counter field:
var num=0;
for (var a=0;a<ListBox1.items.nodes.length;a++){
if (ListBox1.getItemState(a))
num++;
}
this.rawValue=num;
Exit the list box and the field will calculate.
Kyle
Views
Replies
Total Likes
Excellent, thank you very much.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies