>I need to set the Line number in my view. This updatable view has a extra field call line. This field is the number of the line according to the order set in the view.
>
>How can I set this line Number in my view? I need this field to be reset when I do Requery().
Hi Jean Rene,
Here's a trick similar to one I just used to track something:
Create a prg called MyLineCounter
if vartype( gLineCount) = "U"
public gLineCount
gLineCount = 0
endif
if vartype( gLastCountTime) = "U"
public gLastCountTime
gLastCountTime = 0
endif
if seconds() - gLastCountTime > 2
gLineCount = 0
endif
gLineCount = gLineCount + 1
gLastCountTime = seconds()
return gLineCount
Then in your view:
Select MyLineCounter() as LineNumber, ....
It's not the most straightforward way and I'm sure others will come up with more creative solutions, but it poped up when I saw your question. Hope it helps!
Alex
Low-carb diet not working? Try the Low-food diet instead!