'Pre-Order Time': If(!IsBlank(PreOrderTime.Text) && Trim(PreOrderTime.Text) <> "",DateAdd(DateValue(Text(Now(), "[$-en-US]yyyy/mm/dd")) + TimeValue(PreOrderTime.Text),TimeZoneOffset(Now()),Minutes),Blank()),
Patch(
Orders,
Defaults(Orders),
{
'Date/Time': Now(), // Ensure this remains DateTime
'Pre-Order Time': If(
!IsBlank(PreOrderTime.Text) && Trim(PreOrderTime.Text) <> "",
DateAdd(
DateValue(Text(Now(), "[$-en-US]yyyy-mm-dd")),
Value(Hour(TimeValue(PreOrderTime.Text))),
Hours
) + Time(
Hour(TimeValue(PreOrderTime.Text)),
Minute(TimeValue(PreOrderTime.Text)),
0
),
Blank()
)
}
)
With(
{
orderSeq: Filter(
SortByColumns(
Orders,
"Date_x002f_Time", SortOrder.Ascending,
"CompletedTime", SortOrder.Ascending
),
Status = "Urgent" &&
(Progress = "Order Received" || Progress = "In Progress" || Progress = "Delivery")
)
},
ClearCollect(testOrders, orderSeq), // Collect sorted data for inspection
ForAll(
Sequence(CountRows(orderSeq)),
Patch(
Index(
orderSeq,
Value
),
{RowNo: "U" & Value}
)
)
)
WarrenBelz
146,513
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,681
Most Valuable Professional