cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CAP where clause to filter dates in an As Projection Variant entity service

jr_golive
Explorer
0 Likes
727

Hello community. 

I'm currently trying to use a where clause to filter by dates (only to show a list of items created in a 30 days range from the current day), in my entity service created using the As Projection Varian approach. The problem is that I'm not sure how to have that value date dynamically calculated into a sort of variable, so the filter can occur.

The OData service is being consumed by an 3rd party app, in which the user can post items in the table. But also the external app is getting the list of items created, but they need to be filtered using the criteria described above (today - 30days).

Any insight would be highly appreciated.

The model:

jr_golive_0-1738345710814.png

The entity service exposed with the where clause incomplete

jr_golive_1-1738345808970.png

 

 

View Entire Topic
Dinu
Active Contributor
0 Likes
jr_golive
Explorer
0 Likes

Hey Dinu. Thanks for your reply.

That could have been an option. The problem is that I need to have some calculations in place (not just the usage of the pseudo variable). The approach we have gone to is service handler implementation in js. That way we can make sure we can restrict using any different complex calculation