Hi all!
I have two tables, a "Project" table and a "Projectline" table. I have a card page for the Project, and within that card page I have a Page (Type=ListPart) for my ProjectLines. I would like to include the primary key of the Project table in my ProjectLine table, however I don't know how to copy that value because I am not technically within the Project table while I'm inserting new records into the ProjectLines Subpage.
Can anyone help me get the value of the Project Table, and insert it into the projectlines record table?
Side note: If anyone has tutorials on finding/sorting/filtering records, I would love to see them.. I cannot quite make sense of Microsoft's built-in documentation..
Thanks!
Hi Garrett B,
To include the primary key of your Project table in the ProjectLine subpage you need to add the table relation and then subpage link it to your cardpage.
In your Project Line table
field(1; ProjectNo; code[20]) { TableRelation = ProjectTable.ProjectNo; } field(2; LineNo; Integer) { AutoIncrement = true; } } keys { key(PK; ProjectNo, LineNo) { Clustered = true; } }
In your project card page
part(ProjectLineSubPage; ProjectLineSubPage) { ApplicationArea = All; SubPageLink = ProjectNo = field(ProjectNo); Caption = 'Project Lines'; }
Make sure that ProjectNo is the primary key value in your Project Table as well.
Let me know if you have any further questions
Regards
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156