I would like to create a filter like RESDET_AANKOMST >=now() and RESDET_AARKOMST <=now() + 24 hours.
RESDET_Arrival looks like 2022-05-18 09:00:00:00 (datetime) in the table
I thought something like the following but also get a delegation warning (see image) SortByColumns(Filter('Room.vwRoomSetup',RESDET_AARST>=Now(),(DateValue(Text(RESDET_AARKOMST,DateTimeFormat.LongDateTime))<=Today()+1), LOK2="AAA" Or LOK2="BBB"),"RESDET_ARRIVAL",Ascending,"BI_DESCRIPTION",Ascending)
Regards
Solved! Go to Solution.
Hi @rho1967 ,
I will give you two possibilities here - the first if the newest 500 records (you can increase this to 2,000) will do the job
With(
{
wList:
Sort(
'Room.vwRoomSetup',
ID,
Descending
)
},
SortByColumns(
Filter(
wList,
RESDET_AARST >= Now() &&
(
DateValue(
Text(
RESDET_AARKOMST,
DateTimeFormat.LongDateTime
)
) <= Today()+1
) &&
(
LOK2="AAA" ||
LOK2="BBB"
)
),
"RESDET_ARRIVAL",
Ascending,
"BI_DESCRIPTION",
Ascending
)
)
but your issue is actually here
DateValue(
Text(
RESDET_AARKOMST,
DateTimeFormat.LongDateTime
)
)
If you are looking for 24 hours
With(
{
wNow: Now(),
w24:
DateAdd(
Now(),
24,
Hours
)
},
SortByColumns(
Filter(
'Room.vwRoomSetup',
RESDET_AARST >= wNow &&
RESDET_AARKOMST <= w24 &&
(
LOK2="AAA" ||
LOK2="BBB"
)
),
"RESDET_ARRIVAL",
Ascending,
"BI_DESCRIPTION",
Ascending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @rho1967 ,
I will give you two possibilities here - the first if the newest 500 records (you can increase this to 2,000) will do the job
With(
{
wList:
Sort(
'Room.vwRoomSetup',
ID,
Descending
)
},
SortByColumns(
Filter(
wList,
RESDET_AARST >= Now() &&
(
DateValue(
Text(
RESDET_AARKOMST,
DateTimeFormat.LongDateTime
)
) <= Today()+1
) &&
(
LOK2="AAA" ||
LOK2="BBB"
)
),
"RESDET_ARRIVAL",
Ascending,
"BI_DESCRIPTION",
Ascending
)
)
but your issue is actually here
DateValue(
Text(
RESDET_AARKOMST,
DateTimeFormat.LongDateTime
)
)
If you are looking for 24 hours
With(
{
wNow: Now(),
w24:
DateAdd(
Now(),
24,
Hours
)
},
SortByColumns(
Filter(
'Room.vwRoomSetup',
RESDET_AARST >= wNow &&
RESDET_AARKOMST <= w24 &&
(
LOK2="AAA" ||
LOK2="BBB"
)
),
"RESDET_ARRIVAL",
Ascending,
"BI_DESCRIPTION",
Ascending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
190 | |
57 | |
43 | |
36 | |
34 |
User | Count |
---|---|
270 | |
78 | |
75 | |
74 | |
66 |