Hi @v-jefferni
Thank you for replying,
First I'm using SQL data source, and I'm filtering data on the basis of Delivery_date, I'm using one column IntDeliveryDate on this column value I easily filter following this tutorial https://www.youtube.com/watch?v=t4psUHxvI38&ab_channel=PaulO%27Flaherty
Start Date choosing date DeliveryStartDate.Selected.Date
I'm Date converting into Format and storing in a variable
Filter Button OnSelect - Set(varDDDate, Value(Text(DeliveryStartDate.Selected.Date,"[$-en-US] yyyymmdd")));
Gallery Item - SortByColumns(Filter(SQL_Data_Source, IntDeliveryDate = varDDDate ),"DeliveryDate",Ascending)
And I'm also converting Time Format because I'm getting Some different time formats when I pull data from SQL. In Gallery Label StartTime on property Text- ThisItem.ShiftStartTime I replace by
First(
ForAll(
MatchAll( ThisItem.ShiftStartTime, "PT(?:(?<hours>\d+)H)?(?:(?<minutes>\d+)M)?(?:(?<seconds>\d+)S)?" ),
Time( Value( hours ), Value( minutes ), Value( seconds ) )
)
).Value
This code to showing the time slot.(ShiftStartTime and ShiftEndTime both Text replced by same code)
In this galleryEmp, I'm using the Dropdown column, and In this dropdown connected the Employee table where I pull employee names. but Currently, I'm using static data (like XY1,XYZ2,....).
In this dropdown OnChange property, I'm using Collection when where I collect data in colEmp
Set(
SelectedEmployee,
DropEmpName.Selected.Value
);
If(
DropEmpName.Selected.Value <> "Select",
If(
!IsBlank(
LookUp(
colEMP,
DeliveryDate = DateValue(LabelDeliveryDate.Text) And ShiftStartTime = LabelStartTime.Text And ShiftEndTime= LabelEndTime.Text And EmployeeName = DropEmpName.Selected.Value
)
) ,
Set(varDuplicatePop, true),
If(
IsBlank(
LookUp(
colEMP,
ID = Value(LabelID.Text)
).ID
) ,
Collect(
colEMP,
{
ID: Value(LabelID.Text),
EmployeeName: DropEmpName.Selected.Value,
DeliveryDate: DateValue(LabelDeliveryDate.Text),
ShiftStartTime: LabelShartTime.Text,
ShiftEndTime: LabelEndTime.Text
}
),
UpdateIf(
colEMP,
ID = LookUp(
colEMP,
ID = Value(LabelID.Text)
).ID,
{EmployeeName: DropEmpName.Selected.Value}
)
))
);
If(DropEmpName.Selected.Value = "Select",
Remove(colEMP,LookUp(colEMP,ID = GalleryEmp.Selected.ID))
);
I'm showing the pop message on the same screen and I'm using Duplicatepop variable is true when my condition Set(varDuplicatePop, true)
But ShiftStartTime and ShiftEndTime is Text in my collection So that's why I can't compare conditional formula on it's showing Error.
DeliveryDate and WorkingDate is same column(Notes)
First I want to show pop message when Employee assigned twice on same day or Overlapping shift on same day and after that I when I clicked Cancel button I want to Reset only this Dropdown , but still showing value
1. Filter data from SQL directly
2. dropdown static data using
3. Override Timeslot pop message
4. Collect data in collection showing format
5. Explaining What I want required
Please let me how to convert Time 2:00 AM/PM into number