Filter map() For Date / Time Greater Than 5pm

If I have an array of items containing date fields, how can I filter my array to remove any items with a date before 5pm today? I’ve tried using:

{{map(18.`Sorted Shifts`; "start"; "date"; >= addHours(formatDate(now; "YYYY-MM-DD"); 17))}}

But it looks like you can’t include operators in the filter criteria.

I know that I could use an iterator x aggregator combo to filter the array but just thought I’d check whether that can be avoided?

1 Like

You can’t do an inline filter with built-in functions.

You simply need to ITERATE the array, perform the filter, then AGGREGATE back into an array.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

3 Likes

Thanks for letting me know!