Hi @v-xida-msft ,
The infinite loop is still running. Following is the video

Following is the On Visible property of the screen (it also has other formulas)
UpdateContext({Visibility_SelectRole:false,Calibration:false,Highlight:false});
//---------------------------------------------------------------------------------------------
Clear(MyAssignmentsTemp);
//Filter thr latest tasks assigned to you in the Resource Database
ClearCollect(
MyAssignmentsTemp,Filter(SortByColumns(Resource_database,"Created",Descending),
Resource_TO = ProfileDisplayName || Resource_TO2 = ProfileDisplayName ||
Resource_TO3 = ProfileDisplayName || Resource_TO4 = ProfileDisplayName ||
Resource_TO5 = ProfileDisplayName ||
Resource_BML = ProfileDisplayName || Resource_BML2 = ProfileDisplayName ||
Resource_BML3 = ProfileDisplayName || Resource_BML4 = ProfileDisplayName ||
Resource_BML5 = ProfileDisplayName ||
Resource_PKG = ProfileDisplayName || Resource_PKG2 = ProfileDisplayName ||
Resource_PKG3 = ProfileDisplayName || Resource_PKG4 = ProfileDisplayName ||
Resource_PKG5 = ProfileDisplayName ||
Resource_RA = ProfileDisplayName || Resource_RA2 = ProfileDisplayName ||
Resource_RA3 = ProfileDisplayName || Resource_RA4 = ProfileDisplayName ||
Resource_RA5 = ProfileDisplayName ||
Resource_AQE = ProfileDisplayName || Resource_AQE2 = ProfileDisplayName ||
Resource_AQE3 = ProfileDisplayName || Resource_AQE4 = ProfileDisplayName ||
Resource_AQE5 = ProfileDisplayName ||
Resource_Others = ProfileDisplayName || Resource_Others2 = ProfileDisplayName ||
Resource_Others3 = ProfileDisplayName || Resource_Others4 = ProfileDisplayName ||
Resource_Others5 = ProfileDisplayName
).TaskID
);
//Filter above tasks in TaskPlanner Database to populate Resource tasks gallery (ResourceTaskTable)
Clear(MyAssignments);
ClearCollect(MyAssignments,Filter(TaskPlannerDatabase,TaskID in MyAssignmentsTemp.TaskID ));
//---------------------------------------------------------------------------------------------
//Collection to be used for populating the total hours spent by the resource on the all tasks
ClearCollect(TotalHours,Filter(EffortHoursDatabase,ResourceName = ProfileDisplayName));
//Collection to be used for populating the MTD hours spent by the resource on the all tasks
ClearCollect(MTDHours,Filter(EffortHoursDatabase,MonthNumber=Month(Today()),ResourceName=ProfileDisplayName));
//---------------------------------------------------------------------------------------------
//Filter "WIP" Tasks from the ResourceTaskTable
ClearCollect(ResourceTasks,Distinct(Filter(ResourceTaskTable.AllItems,TaskStatus="Work in Process"),TaskID));
//For all tasks with status "WIP" check if a calibration activity for the current month exists and create one accordingly
UpdateContext({Calibration_Activity: "Calibration " & Text(Today(),"[$-en-US]mmm")});
ForAll(
ResourceTasks,
If(
IsEmpty(
Filter(
EffortHoursDatabase,
Activity= Calibration_Activity,
TaskID= Result,
ResourceName=ProfileDisplayName,
MonthNumber = Value(Text(Today(),"[$-en-US]m"))
)
),
Patch(EffortHoursDatabase, Defaults(EffortHoursDatabase),{
Activity:Calibration_Activity,
TaskID:Result,
ResourceName:ProfileDisplayName,
MonthNumber:Value(Text(Today(),"[$-en-US]m")),
ResourceO365ID:Office365Users.MyProfile().Id
})
)
);
Answer to your question: Gallery source is 'MyAssignments'.
Following is the OnChange property of the Slider
If(
LookUp(
EffortHoursDatabase,
TaskID = ThisItem.TaskID &&
ResourceName=ProfileDisplayName &&
Activity = Calibration_Activity
).Hours <> Hours_InputSlider_2.Value, // Check if the Slider is changed manually
Patch(
EffortHoursDatabase,
LookUp(
EffortHoursDatabase,
TaskID = ThisItem.TaskID &&
ResourceName=ProfileDisplayName &&
Activity = Calibration_Activity
),
{Hours:Hours_InputSlider_2.Value}
)
)
I think the issue is here because when I emptying this property for testing, the infinite loop stops running.
LookUp(EffortHoursDatabase,
TaskID = ThisItem.TaskID &&
ResourceName=ProfileDisplayName &&
Activity = Calibration_Activity
).Hours
Regards,
Aakash