Hi @jubae22 ,
You could try the expression below. Note I have assumed the 'Employee Name' field is a Text field rather than a SharePoint or Dataverse People field.
If(
Weekday(BusinessDay_DatePicker.SelectedDate) in ColWeekDays,
If(
IsBlank(
LookUp(
Timesheet_Entries_T,
'Employee Name' = User().FullName And WeekEnding = BusinessDay_DatePicker.SelectedDate
)
),
Notify(
"You selected a Friday",
NotificationType.Success
);
Navigate(
TimeCardNew,
ScreenTransition.Cover
),///ELSE
Notify(
"Timesheet already exists for the selected weekending please go to edit timesheet menu",
NotificationType.Error
)
),///ELSE
Notify(
"Date must be Friday",
NotificationType.Error
)
);
One observation - if the purpose of ColWeekDays is only to return a list of Friday dates, you could exclude the collection and instead use a slight variation of above expression below:
If(
Weekday(
DateValue(BusinessDay_DatePicker.SelectedDate),
StartOfWeek.Monday
) = 5,
If(
IsBlank(
LookUp(
Timesheet_Entries_T,
'Employee Name' = User().FullName And WeekEnding = BusinessDay_DatePicker.SelectedDate
)
),
Notify(
"You selected a Friday",
NotificationType.Success
);
Navigate(
TimeCardNew,
ScreenTransition.Cover
),///ELSE
Notify(
"Timesheet already exists for the selected weekending please go to edit timesheet menu",
NotificationType.Error
)
),///ELSE
Notify(
"Date must be Friday",
NotificationType.Error
)
);
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution
If you like my response, please give it a Thumbs Up.