Combine Different Tabels in one Form

JKoBJKoB Member Posts: 40
Hey!

I have a form (“Lot-No.-Info”) which shows me “Item-No.” & “Lot. No” & “QOH” [TABEL1]
I can reach this form from the itemcard.

In another tabel i have following fields: [TABEL2]
“Item-No.”
“Lot-No.”
“Exp.-Date“
„Usage“

How can I add the Fields “Exp.-Date” & Usage in the “Lot-No.-Info”-Form?

What I tried is:
Globals:
T1 – Record – TABEL1
T2 – Record – TABEL2
ED – Date
Usage – Text
[i]OnAfterGetRecord[/i]

T2.RESET
      T2.SETRANGE("Lot No.",T1."Lot No.");
      IF T2.FINDFIRST THEN
        ED := T2."Expiration Date";
        Usage := T2.”Usage”;

Inserted column with src-expr. „ED“
Inserted column with src-expr. „Usage“

Problem: Those Fields stay empty …. humm

Any suggestions?

Hasta Luego

Answers

  • DaveTDaveT Member Posts: 1,039
    Hi Hasta,

    You are using T1."lot no." for the setrange should this not be rec."lot no." or just "lot no."

    Also for refresh you might want to use onaftergetcurrentrecord trigger.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • JKoBJKoB Member Posts: 40
    works much better now :roll:

    Thanks!

    PS: didnt have to put it in the onaftergetcurrentrecord - trigger

    Jakob
Sign In or Register to comment.