Maybe a stupid one but I stumbled across this only today. I'm trying to put the cursor in a list form to the line which was found in a variable of the same record. I read the online help, adg and the topics but...
Here is the abstract of my code:
VariableOfRec.SETRANGE(...something...);
VariableOfRec.FINDFIRST;
bla..
bla...
Rec.SETPOSITION(FORMAT(VariableOfRec.GETPOSITION));
I'm doing this in a function of a form (nothing special really). It "kind of" works because the cursor jumps to either one line before or one line after the correct record/line!?
0
Answers
does "rec" variable has filters?
did you already try to remove the FORMAT from the getposition?(it's useless)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
FILTERGROUP := 2;
SETRANGE(SomeField,SomeValue);
FILTERGROUP := 0;
...but the variable of that record has the same one set - double checked. GETPOSITION returns the correct Line No. which complies to the one in Rec but the cursor just won't jump to that one - it prefers to annoy me with fooling around...
I tryed it without FORMAT and with GETPOSITION(FALSE) - same result.
The form has a kind of std. NAV worksheet functionality.
If i remember well, the setposition respects the applied filters and gets nearest record of where you positioned (i think it behaves like a find('<>=') after setting the key values) :-k
edit: ok, i didn't notice this
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
But regardless, now I want to know if the setposition works correctly
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I'll try some quick and dirty workarounds tomorrow - had enough of CSIDE for today...
Thanks for the effort guys!