Tbitem.setrange("no.",'aaa'); Tbitem.findset; repeat tbitemtemp := Tbitem; if tbitemtemp.insert then; until Tbitem.next = 0;
Tbitem.reset; Tbitem.setrange("description",'*aaa*'); Tbitem.findset; repeat tbitemtemp := Tbitem; if tbitemtemp.insert then; until Tbitem.next = 0;
if page.runmodal(0,tbitemtemp) = action::lookupok then begin CDMyItemCodeVariable := tbitemptemp."no."; Myvalidatefunctionforitemcodevariable; end;
//fill the buffer if the temporary table is still uninitialized Myvalidatefunctionforitemcodevariable;
tbitemtemp.get(CDMyItemCodeVariable); //this instruction gives the error "item no. xxx does not exist" <--a bit confusing for the user, //as the item xxx DOES exist in the real table, but not in the temporary table //other processing...
Answers
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
now, i was using something like what you wrote me, instead of a standard "GET" error: something like:
"item AAA not valid, use the lookup button, instead."
the problem is that the user don't know why its item is not correct, unless i manage every single error that can rise from the temporary table...this is expensive in terms of time of development, so i'll go for the "generic error" solution, that is the "if it was hard to program, it has to be hard to understand!" philosophy :whistle:
thank you!
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Better put a generic error-message so the user knows it is a wrong item but the error in itself is not a bug.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!