Hello,
Two questions: 1. Why are the fields Approval Modification Date and Modification Approver in my gallery clearing the data when I click the save to collection button?
Question 2: Is it possible to populate the new fields in the gallery that my collect function is using to create a new record with any of the last record data in my collection?
Picture 1: Repeating Table fields.
When the toggle is set to yes this is the first record in the repeating table.
The value at the top right is set based on a value set on top of the form and is a unique value.
I entered the date and the approver's name but not the reason yet.

Below, I entered the reason which then shows the save button and delete button and sets the counter to 1.

Here is where it becomes a problem. When I save the record it clears the date (the default is Today()) and it clears the Approver name but retains the Reason.
A new record is created below the first record in the collection and I would expect the new record to be empty but not the first record.

In regard to the image above is it possible to set the Date field and Approver field to the values saved in the last record in my collection?
Below is the logic for what I am doing:
On my parent form I have a button that loads a new form.
This is the formula used in the button.
ClearCollect Logic:
ClearCollect(colAppMod,{CSARefNumb:"", AppModDate:"", AppModApprover:"", AppModReason: ""});
Patch the collection and create a new blank record:
Patch(
colAppMod,
ThisItem,
{
CSARefNumb: DataCardValue16.Text,
AppModReason: AppModReason.Text,
AppModDate: dteAppModDate.SelectedDate,
AppModApprover: cboAppModApprover.Selected.DisplayName
}
);
Collect(
colAppMod,
{
CSARefNumb: "",
AppModDate: "",
AppModApprover: "",
AppModReason: ""
}
)
Save to the child SharePoint list:
ForAll(
colAppMod,
Patch(
'Approval Modification',
Defaults('Approval Modification'),
{
CSARefNumb: CSARefNumb,
ModApprovalReason: AppModReason,
ModApprovalDate: DateTimeValue(AppModDate),
ModApproverName:{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: Concatenate("i:0#.f|membership|",AppModApprover),
Department: AppModApprover,
DisplayName: AppModApprover,
Email: AppModApprover,
JobTitle: "",
Picture: ""
}
}
)
)