Hello evryone i have a task where i need to add a field that will be showing the sum of the amounts on the product receipt lines and the Currency in the product receipt journal.

The distributions view in yallow is where I can locate the lines with their amounts and currencies as demonstrated in the image below

When I checked, the field was getting data by an edit method. I want to know how to sum the multiple lines of the selected record also their value and how to acquire the relationship between the two forms/datasources.
thank you.