Hi,
I would like to apply an ODATA Filter Query to my SharePoint Online 'Get items' action. I have a SharePoint Date & Time field called 'Booking Date' and I would to filter the results based on when that date has passed (the Power Automate will run once a day).
So far I have:
BookingDate lt '@{formatDateTime(utcNow(),'dd-MM-yyyy')}'
But it's not finding any matches.
Does anyone have any suggestions? Any help appreciated, thanks.
Solved! Go to Solution.
Ah sorry, It was a naming mistake - it was 'Booking Date' in SharePoint and I thought I could just remove the space to make it 'BookingDate' in the ODATA Filter Query but it looks like that doesn't work. 'Booking_x0020_Date' doesn't work either. So instead I've just created a new field called 'BookingDate' and that works. If anyone knows how to get columns with spaces to work please let me know, but in the meantime I'll mark this as solved. Thanks @v-bacao-msft for your support!
Hi @rhiheu ,
You could try to change the format to 'yyyy-MM-dd'.
Best Regards,
Hi @v-bacao-msft, thanks for the suggestion. I've tried that:
BookingDate lt '@{formatDateTime(utcNow(),'dd-MM-yyyy')}'
But unfortunately now it says 'String was not recognised as a valid DateTime. Creating query failed.'
I'm not sure what to try next 🙂
Hi @rhiheu ,
What is the type of AptDate?
Best Regards,
Sorry that was a typo, now fixed. BookingDate is a SharePoint Date & Time field.
Ah sorry, It was a naming mistake - it was 'Booking Date' in SharePoint and I thought I could just remove the space to make it 'BookingDate' in the ODATA Filter Query but it looks like that doesn't work. 'Booking_x0020_Date' doesn't work either. So instead I've just created a new field called 'BookingDate' and that works. If anyone knows how to get columns with spaces to work please let me know, but in the meantime I'll mark this as solved. Thanks @v-bacao-msft for your support!
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
45 | |
43 | |
41 | |
41 | |
32 |
User | Count |
---|---|
83 | |
81 | |
59 | |
50 | |
42 |