Hello everyone,
need your help.
I have a simple SP list:

Employee - users column;
From; To - date/time column
Days; Dep - text column
Close - choise column with Yes/No values
Based on the list data, I created 2 galleries: general - which shows the total number of vacation days of the employee, and detailed - which shows the employee requests.

For Gallery 1 the Item property is:
AddColumns(GroupBy(AddColumns(Vacation4, "EmplName", Employee.DisplayName), "EmplName", "GrpEmplName"), "TotalDays",
Sum(Filter(GrpEmplName, Close.Value = "No" && EmplName = Employee.DisplayName), Days))
i.e. I grouped all the requests by employee and counted the total days if status Close = No.
For NextArrow_1 in this gallery I set folowing value for OnSelect property:
Set(varRecord, Filter(Vacation4, Employee.DisplayName = ThisItem.EmplName));
Select(Parent)
For Galley2 Items property is:
Filter(varRecord,ThisRecord.Close.Value = "No")
In the allery, I can see the employee's requests in detail.
NextArrow_2 Omselect property:
Set(varRecord2, ThisItem);
Select(Parent);
EditForm(frmAddVacation)
AddVacation form has the following properties:
Item:
If(frmAddVacation.Mode=FormMode.New, Blank(), varRecord2)
OnSuccess:
If(
frmAddVacation.Mode = FormMode.New,
Patch(
Vacation4,
Defaults(Vacation4),
{
Employee: cmbFrmEmployee.Selected,
Dep: txtFrmDep.Text,
From: dteStartDate.SelectedDate,
To: dteEndDate.SelectedDate,
Days: DataCardValue5.Text,
Close: {Value: "No"}
}),
Patch(Vacation4,
LookUp(Vacation4, varRecord2.ID = ThisRecord.ID),
{
Employee: cmbFrmEmployee.Selected,
Dep: txtFrmDep.Text,
From: dteStartDate.SelectedDate,
To: dteEndDate.SelectedDate,
Days: DataCardValue5.Text,
Close: {Value: "No"}
}
)
)
Problem one is : when I add a new request, it does not automatically appear in the Gallery_2. I have to click on a NextArrow_1 button.
Second problem: when I make changes to the gallery items, it doesn't show up automatically either. For example, when I change the date(From or To) and click on Submit button, the gallery still shows the old date. And again forced to click on the NextArrow_2 button to update the data.
What changes should I make so that I can automatically see new added items in the Gallery_2 as well and the changes I made are automatically reflected.
Thanks in advance!