I have Table A which has the following fields:
Code of type code 10
Description of type text 30
G/L Account Number with table relation to "G/L Account"."No."
The Primary key is Code and G/L Account Number.
so...this can be an example of some records:
Code........................Description........................G/L Account No.
EEEE...........................Description of EEEEE............12345678
EEEE...........................Description of EEEEE............33333333
EEEE...........................Description of EEEEE............55555555
FFFF............................Description of FFFFFF.............9999999
FFFF............................Description of FFFFFF.............8888888
I have made a List form from Table A which shows only Code and Description. This form is the LookupFormID for Table A.
On another form, I have a Textbox with a TableRelation to Table A, which has a source expression CCC, which is a Global Variable of text 30.
Now...
When I click on the Textbox's lookup button I want the List to show up without repeating ...for example...
I would want from the above the following to show up:
EEEE...........................Description of EEEEE
FFFF............................Description of FFFFFF
what shows up now is:
EEEE...........................Description of EEEEE
EEEE...........................Description of EEEEE
FFFF............................Description of FFFFFF
FFFF............................Description of FFFFFF
Is this possible? Can anyone help me?
0
Comments
In table A you will use a TableRelation for filed Code using Table B.
The SourceTable for List form will be the new table (Table
Another way is to use temporary table in the List form.
Navision Solution Developer
Intelligent Systems Bulgaria
Navision Solution Developer
Intelligent Systems Bulgaria
Another solution is to fill temp. table in same manner and show this virtual table. But BEST is (if something other is not problem than) - split the tables>
Table A: Code + Description
Table B: Code (linked to table A), G/L Account No. (Linket to GL Acc.), Description (lookup flowfield to table A)
than you can made lookup to table A and you have correct list...
(as s.delikostov wrote)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Navision Solution Developer
Intelligent Systems Bulgaria
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
According to your code, TableA is a record variable to my table and TableATemp is a temporary record variable to the same table.
When I do TableATemp.SETRANGE(Code,TableA.Code) the first code is Rec.Code right?
Well... I tried this, and it didn't work... it didn't show the ones it is supposed to show. if there were
Code...........Code Description........G/L Account
AAA ............. AAA description........12344
AAA...............AAA Description........33333
BBB...............BBB Description........44444
BBB...............BBB Description........55555
CCC..............CCC Description........66666
It only showed CCC nothing else.
KINE,
I tried yours...
TableA is the temporary record variable of my table right? When I do
TableA.SETFILTER(Code,TableA.Code) the first code is Rec.Code right?
The second SETFILTER you have only has Code in it... that isn't right...???
Should it be the same as the first SETFILTER?
FORM.RUNMODAL(ListForm,TableATemp);
add the line:
TableATemp.RESET;
Navision Solution Developer
Intelligent Systems Bulgaria
means, skip all next records with same Code as Now and than clear this filter... TableA.Next then go to next code...
Oh, sorry, correction, the line must be
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I have a Textbox with SourceExpression lalala which is type Text 30
and it has a Table relation to Table A....
Now, when I click the lookup it opens the list form just as I wanted, but now, it doesn't let me double click on the item I want it to show.
Before I put the code on the OnLookup trigger, it showed me everything, and I would simply double click on the one I wanted, and it would show it.
How can I make that work again?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
it would then put the rest of the information I wanted in the table box I have below the lookup text box...
Now, do I put the code I had OnAfterGetRecord in the OnLookUp trigger?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks a lot for all your help!!!
I appreciate it!