Hi
I have a grid with 2 columns
One column is the line of my order
the other column is the qty that I shipped.
What I would like to do is to cumulate all column that the line are the same.
For example
I have these record
Line QTY
1 12
2 10
2 10
3 14
I would like to cumulate the line 2 in a variable to have a qty of 20.
I tried this but it doesn't work (it put nothing in my variable)
Do While i <= ThisForm.PrimaryCache.GetNumEntries
If i = 0 Then
ThisForm.Variables("QtyVar"
.Value = ThisForm.GetObjectProperty("UbQtyToShpConvGridCol", i)
Else
If ThisForm.PrimaryCache.GetObjectProperty("CoLineGridCol", i) = ThisForm.PrimaryCache.GetObjectProperty("CoLineGridCol", i - 1) Then
ThisForm.Variables("QtyVar"
.Value = ThisForm.Variables("QtyVar"
.Value + ThisForm.Components("UbQtyToShpConvGridCol"
Else
ThisForm.Variables("QtyVar"
.Value = ThisForm.PrimaryCache.GetObjectProperty("UbQtyToShpConvGridCol", i)
End If
End If
i = i + 1
Loop
I have a grid with 2 columns
One column is the line of my order
the other column is the qty that I shipped.
What I would like to do is to cumulate all column that the line are the same.
For example
I have these record
Line QTY
1 12
2 10
2 10
3 14
I would like to cumulate the line 2 in a variable to have a qty of 20.
I tried this but it doesn't work (it put nothing in my variable)
Do While i <= ThisForm.PrimaryCache.GetNumEntries
If i = 0 Then
ThisForm.Variables("QtyVar"
Else
If ThisForm.PrimaryCache.GetObjectProperty("CoLineGridCol", i) = ThisForm.PrimaryCache.GetObjectProperty("CoLineGridCol", i - 1) Then
ThisForm.Variables("QtyVar"
Else
ThisForm.Variables("QtyVar"
End If
End If
i = i + 1
Loop