CR 10
Hello,
I have an urgent problem here:
The data rows come sorted by firm number an property LP.
Now I need a formula, that counts every occurrence of firm number with property LP.
But the firm number is to count only once, if the property LP occurs more than once out of (1621,1623).
I tried it with global variables but this doesn't work:
The code for the formula goes like this:
--------------------------
WhileReadingRecords
Global FirmNum as number
Global MultKey as number
formula = 0
If FirmNum <> TAB1.FirmNum } Then
FirmNum = {TAB1.FirmNum }
MultKey = 0
End If
If {TAB1.LP} = 1621 or {TAB1.LP} = 1623 Then
MultKey = MultKey + 1
End If
If {TAB1.LP} = 1621 or {TAB1.LP} = 1623
if MultKey < 2 then
formula = + 1
end if
else
formula = + 1
end if
--------------------------
The formula results show that global variable are not set and changed properly, eg. 2 instead of 1 .
Did I use the global variable not correctly or is there a different solution to my problem ?
Many thanx in advance
bidra
Hello,
I have an urgent problem here:
The data rows come sorted by firm number an property LP.
Now I need a formula, that counts every occurrence of firm number with property LP.
But the firm number is to count only once, if the property LP occurs more than once out of (1621,1623).
I tried it with global variables but this doesn't work:
The code for the formula goes like this:
--------------------------
WhileReadingRecords
Global FirmNum as number
Global MultKey as number
formula = 0
If FirmNum <> TAB1.FirmNum } Then
FirmNum = {TAB1.FirmNum }
MultKey = 0
End If
If {TAB1.LP} = 1621 or {TAB1.LP} = 1623 Then
MultKey = MultKey + 1
End If
If {TAB1.LP} = 1621 or {TAB1.LP} = 1623
if MultKey < 2 then
formula = + 1
end if
else
formula = + 1
end if
--------------------------
The formula results show that global variable are not set and changed properly, eg. 2 instead of 1 .
Did I use the global variable not correctly or is there a different solution to my problem ?
Many thanx in advance
bidra