How to pass records from SubForm1 App1 into SubForm2 App2

How to pass records from SubForm1 App1 into SubForm2 App2

Hello experts,

Cannot figure it out ;o(
Seems simple in theory, but becomes complicated in practice - usual story ;o)

Problem:
two different Apps - App1 and App2:
App2 is the "main database" used by multiple teams.
App1 is used by small team to update records of an Item in App2.

App1
Products1 (Form1)
Item1 - a product from Products1 form
Photos1 (SubForm1 in Products1) - SubForm to store photos for Item1
Image - Field in SubForm1 to store images for Item1 (Image1_1 to Image1_N)

Team member takes photos for a chosen Item1 (string Field) in Products1 (Form) and stores them as Image1_1, Image1_2... Image1_N  in Photos1 (Subform).


on Successful Form Submission in App1 all images need to be passed/transfered/updated (Images 1 to N) in App2 Form2 SubForm2 for Item2 (originally empty), but with using Apps - will get populated.


My attempt:

in App1 created function:

fetchPhotos = Products1[Item1 = input.Item].Photos1;
for each photo in fetchPhotos
{
MyPhoto = photo.Image;
app2.UpdatePhotos(input.Item1, input.MyPhoto);
}




In App2 created a function:

void UpdatePhotos(string Item1_Pass, string Photo1)
{
// Item1_Pass - string with Item1 details from App1, Products1)
row1 = Add_Vehicle.Logistics_Images(Item1_pass);
row1.Image = Photo1;

rows = collection();
rows.insert(row1);

Photos2.insert(rows);
info "SUCCESS";
}

doesn't work... ;o(

Please help