Hi @Chris-D Below is my sample Code: But its not working, Patch Condition not working for remove and add record.
// Onstart Code
ClearCollect(
WOMenu,
Table(
{
Title: "Work Order Info",
MenuIcon: Icon.CancelBadge,
Screen: WODetailsPage
},
{
Title: "Daily Huddle",
MenuIcon: Icon.CancelBadge,
Screen: DailyHuddleScreen
},
{
Title: "Leak Investigation",
MenuIcon: Icon.CancelBadge,
Screen: 'Leak Investigation'
},
{
Title: "Service Call",
MenuIcon: Icon.CancelBadge,
Screen: 'Leak Investigation'
},
{
Title: "Completion Report ",
MenuIcon: Icon.CancelBadge,
//Fix Icon
Screen: 'Roof Maintenance'
},
{
Title: "Additional Roof Maintenance",
MenuIcon: Icon.CancelBadge,
//Fix Icon
Screen: 'Additional Roof Maintenance'
},
{
Title: "Daily Progress Report",
MenuIcon: Icon.CancelBadge,
Screen: 'Daily Progress Report'
},
{
Title: "Completion Report",
MenuIcon: Icon.CancelBadge,
Screen: 'Completion Report'
},
{
Title: "Additional Photos",
MenuIcon: Icon.CancelBadge,
Screen: 'Additional Photos'
},
{
Title: "Add Safety Forms Screen",
MenuIcon: Icon.CancelBadge,
Screen: 'Add Safety Forms Screen'
},
{
Title: "Daily Safe Work Permit",
MenuIcon: Icon.CancelBadge,
Screen: 'Daily Safe Work Permit'
},
{
Title: "Maintenance Safe Work Permit",
MenuIcon: Icon.CancelBadge,
Screen: 'Maintenance Safe Work Permit Screen'
},
{
Title: "Working at heights",
MenuIcon: Icon.CancelBadge,
Screen: 'Working at heights Sc'
},
{
Title: "Near Miss/Hazard Identification",
MenuIcon: Icon.CancelBadge,
Screen: 'Near Miss/Hazard Identification'
},
{
Title: "Heavy Equipment Lifting",
MenuIcon: Icon.CancelBadge,
Screen: 'Heavy Equipment Lifting Screen'
},
{
Title: "Accident Investigation Report",
MenuIcon: Icon.CancelBadge,
Screen: 'Accident Investigation Report'
},
{
Title: "Incident Report Form",
MenuIcon: Icon.CancelBadge,
Screen: 'Incident Report Form'
},
{
Title: "Hot Work Permit",
MenuIcon: Icon.CancelBadge,
Screen: 'Hot Work Permit'
},
{
Title: "Daily Hoist Inspection",
MenuIcon: Icon.CancelBadge,
Screen: 'Daily Hoist Inspection Screen'
},
{
Title: "Daily Aerial-Elevated",
MenuIcon: Icon.CancelBadge,
Screen: 'Daily Aerial-Elevated'
},
{
Title: "Fall Protection/ Rescue Equipment",
MenuIcon: Icon.CancelBadge,
Screen: 'Fall Protection / Rescue Equipment'
},
{
Title: "Daily Telehandler Inspection",
MenuIcon: Icon.CancelBadge,
Screen: 'Daily Telehandler Inspection Screen'
},
{
Title: "Fall Protection PPE",
MenuIcon: Icon.CancelBadge,
Screen: 'Fall Protection PPE Screen'
},
{
Title: "Daily Skidsteer Operator Inspection",
MenuIcon: Icon.CancelBadge,
Screen: 'Daily Skid steer Operator Inspection Screen'
},
{
Title: "Daily Kettle Tanker Inspection",
MenuIcon: Icon.CancelBadge,
Screen: 'Daily Kettle Tanker Inspection sc'
},
{
Title: "Check Out",
MenuIcon: Icon.CancelBadge,
Screen: 'Check Out'
}
)
);
// On Visible WO Screen
ForAll(
[
{
MenuTitle: "Daily Huddle",
Completed: SelectedWO.'Daily Huddle Report Completed'
},
{
MenuTitle: "Leak Investigation",
Completed: SelectedWO.'Leak Report Submitted?'
},
{
MenuTitle: "Service Call",
Completed: SelectedWO.'Leak Report Submitted?'
},
{
MenuTitle: "Completion Report",
Completed: SelectedWO.'Additional Roof Maintenance Review Completed?'
},
{
MenuTitle: "Additional Roof Maintenance",
Completed: SelectedWO.'Additional Roof Maintenance Review Completed?'
},
{
MenuTitle: "Daily Progress Report",
Completed: SelectedWO.'Daily Progress Report Completed?'
},
{
MenuTitle: "Completion Report",
Completed: SelectedWO.'Completion Report Completed?'
},
{
MenuTitle: "Daily Safe Work Permit",
Completed: SelectedWO.'Daily Safe Work Permit Completed'
},
{
MenuTitle: "Maintenance Safe Work Permit",
Completed: SelectedWO.'Maintenance Safe Work Permit Completed'
},
{
MenuTitle: "Working at heights",
Completed: SelectedWO.'Working at Heights Completed?'
},
{
MenuTitle: "Near Miss/Hazard Identification",
Completed: SelectedWO.'Near Miss/Hazard Identification Completed?'
},
{
MenuTitle: "Heavy Equipment Lifting",
Completed: SelectedWO.'Heavy Equipment Lifting Completed?'
},
{
MenuTitle: "Accident Investigation Report",
Completed: SelectedWO.'Accident Investigation Form Completed?'
},
{
MenuTitle: "Incident Report Form",
Completed: SelectedWO.'Incident Report Form Completed'
},
{
MenuTitle: "Hot Work Permit",
Completed: SelectedWO.'Hot Work Permit Completed?'
},
{
MenuTitle: "Daily Hoist Inspection",
Completed: SelectedWO.'Daily Hoist Inspection Completed?'
},
{
MenuTitle: "Daily Aerial-Elevated",
Completed: SelectedWO.'Daily Aerial/Elevated Work Platform Completed?'
},
{
MenuTitle: "Fall Protection/ Rescue Equipment",
Completed: SelectedWO.'Fall Protection / Rescue Equipment Checklist Com?'
},
{
MenuTitle: "Daily Telehandler Inspection",
Completed: SelectedWO.'Daily Telehandler Inspection Completed?'
},
{
MenuTitle: "Fall Protection PPE",
Completed: SelectedWO.'Fall Protection PPE Inspection Completed?'
},
{
MenuTitle: "Daily Skidsteer Operator Inspection",
Completed: SelectedWO.'Daily Skidsteer Inspection Completed?'
},
{
MenuTitle: "Daily Kettle Tanker Inspection",
Completed: SelectedWO.'Daily Kettle Tanker Inspection Completed?'
},
{
MenuTitle: "Check Out",
Completed: SelectedWO.'Please confirm you have completed all required sec'
},
],
If(
Completed = "Yes",
Patch(
WOMenu,
LookUp(
WOMenu,
Title = MenuTitle
),
{MenuIcon: Icon.CheckBadge}
),
RemoveIf(
WOMenu,
Title = MenuTitle
)
)
);
If(
SelectedWO.'Work Order Type'.Name = "Leak Investigation",
RemoveIf(
WOMenu,
Title = "Service Call"
);
Set(
leakRequired,
true
);
);
If(
SelectedWO.'Work Order Type'.Name = "Service Call",
RemoveIf(
WOMenu,
Title = "Leak Investigation"
);
Set(
ServiceCallrequired,
true
);
);
If(
SelectedWO.'End Time' <= Now(),
RemoveIf(
WOMenu,
Title = "Daily Progress Report"
);
Set(
CompletionRequired,
true
),
RemoveIf(
WOMenu,
Title = "Completion Report"
)
);
If(
SelectedWO.'Work Order Type'.Name = "Roof Maintenance",
RemoveIf(
WOMenu,
Title = "Service Call" || Title = "Leak Investigation" || Title = "Daily Progress Report" || Title = "Completion Report"
);
Set(
roofmaintenancerequired,
true
);
,
RemoveIf(
WOMenu,
Title = "Completion Report "
)
);