Add data from a field in card page to a field in list part page

I know there exists already a similar post, but the related post with the answer was deleted 4 years ago.

I am sorry to ask again: How can I add data from a field in card page to a field in list part page?

I am working on an Spotify like example to train my skills right now.

There is a card to create an album and add some tracks to the album. You can also create new tracks in this list part.

To avoid typing all the album information for every track i would like to make an autofill of the fields.

I think i have to use the OnValidate trigger of the track table but i don´t know how to get the records from the actual card.

Here is a screenshot of the album card.

I found the solution and it is astonishingly easy…

…just put on the settings of your ListPart:

PopulateAllFields = true;

For example:

page 50011 "SPO TrackListPart"
{
    PageType = ListPart;
    SourceTable = "SPO Track";
    SourceTableView = where("Track Type" = const("Album Track"));
    PopulateAllFields = true;
    Caption = 'SPO Tracklist Albums';
    
    ......

can you show me complete code plz

1 Like