The screen in question is shown below.
The submit button is within the gallery.
There is a Job gallery and an Activities gallery.
The associated images are shown in a third gallery on another screen.
The Job information that appears in the gallery is based on the dropdown
controls.
If only the Job type is selected, all Jobs saved to the device/collection are shown.
If the Location is selected, all Jobs associated with that Location are shown.
If the Work Order No. is selected, only the Job associated with the Work Order
is shown.
A Job can have one or multiple Activities.
Regardless of dropdowns selected, when clicking the submit button, the Patch
formula should upload ONLY the Job and associated activities and images.
All of the above is occurring.
This issue, when there is more than one Job all of the Jobs are being uploaded,
rather than just the one Job in the template where the submit button is located.

//No Connection Save Install Add Trip Data to Device
If(JPU_Job_Type_Dropdown.Selected.Value = "Storm Work",
Patch(Storm_Work_List,
ForAll(colPendingStormWorkData,
{
Activity: colPending_Activity,
Activity_Rate: colPending_Activity_Rate,
Activity_Unit: colPending_Activity_Unit,
Activity_Quantity: colPending_Activity_Quantity,
Activity_Total: colPending_Activity_Total,
Consumed_Unit: colPending_Consumable_Unit,
Consumed_Qty: colPending_Consumed_Qty,
Consumed_Description: colPending_Consumable_Description,
Waste_Qty: Value(colPending_Waste_Qty),
Waste_Description: colPending_Waste_Description,
Waste_Unit: colPending_Waste_Unit,
Location: colPending_Location,
Technician_Name: colPending_Technician_Name,
Technician_ID_Number: colPending_Technician_ID_Number,
Customer_Name: colPending_Customer_Name,
Customer_Account_Number: colPending_Customer_Account_Number,
Job_Hazard_Analysis_Number: colPending_Job_Hazard_Analysis_Number,
Customer_Address: colPending_Customer_Address,
Bill_To: colPending_Bill_To,
Tap: colPending_Light_Level_Tap,
Tap_Pole_Number: colPending_Tap_Pole_Number,
Light_Level_at_NID: colPending_Light_Level_NID,
Invoice_Type: colPending_Invoice_Type,
Title: colPending_Title,
Substation: colPending_Substation,
Assy_Unit_or_Stock_Number: colPending_Assy_Unit_or_Stock_Number,
Work_Date: colPending_Work_Date,
Week_Ending_Date: colPending_Week_Ending_Date,
Role: colPending_Role,
Activity_Comments: colPending_Comments
}
)
)
);
If(JPU_Job_Type_Dropdown.Selected.Value = "Storm Work",
ForAll(
JIPU_Images_Gallery.AllItems,
UploadStormWorkJobImageFlow.Run(JIPU_Location_Fld.Text,
JIPU_Image_Description_Fld.Text,
JIPU_Company_Name_Fld.Text,
JIPU_Work_Order_No_Fld.Text,
JIPU_Job_Type_Fld.Text,
JIPU_Work_Date_Fld.Text,
{
file: {
contentBytes: JIPU_Image.Image,
name: JIPU_Location_Fld.Text & " - " & JIPU_Job_Type_Fld.Text &" - "& JIPU_Image_Description_Fld.Text & " - " & JIPU_Company_Name_Fld.Text &" - "& JIPU_Work_Order_No_Fld.Text &" - "& JIPU_Work_Date_Fld.Text & ".jpg"
}
}
)
)
);