openui5
openui5 copied to clipboard
NOT operator for sap.ui.model.Filter
OpenUI5 version: any
Browser/version (+device/version): NA
Any other tested browsers/devices(OK/FAIL): NA
URL (minimal example if possible): https://answers.sap.com/questions/214856/how-to-build-sap-ui5-filters-with-not.html
User/password (if required and possible - do not post any confidential information here): NA
Steps to reproduce the problem:
- Build a filter
- Wonder how to negate it (OData equivalent of "not")
- Fail.
What is the expected result? I would like to have a "not" flag on my filter. Setting the flag should produce the OData equivalent of "$filter=not(...filter...)"
What happens instead? Head meets desk. How can this feature be missing?
Any other information? (attach screenshot if possible)
Hello @rpbouman , I've created a internal incident 1780185946 regarding your question. You can check its status on GitHub. Regards, Diana
Cheers @Shtilianova , much obliged!
Hello @rpbouman,
yes, we are aware of this, there exists a backlog item for a long time, I have updated it with your information.
Regards, Malte
Thanks goligo. Anything I can do to make this go faster? Does the team accept pull requests?
Hi rpbouman, Is this a enhancement in Filter or the request is still open? Meantime, Is there any work around for the issue?
Regards Karthik S
@karthikspandian well, the latest API docs do not contain proof that the feature is supported yet. So I'm going to say: yes it's still open.
Is there any work being done? - well you'd have to ask SAP I guess. I asked in this thread if the team accepts pull requests, and that remained unsanswered.
I guess this feature will be available as of 1.58 according to https://github.com/SAP/openui5/commit/c2d7bb919da2c64e1ce45e5083dcddaf5796e54a.
Hi,
the commit looks like it will expand the set of some existing operators with negated versions of those operators. These would all be about scalar operators.
My request was for a filter that negates an arbitrary filter in its entirety, in particular, if there is a list of filters combined with the and flag - I need something like that, but to negate them. The equivalent OData filter expression would be:
$filter=<some arbitrary, possibly composite condition>
with the negated filter applied:
$filter=not( <some arbitrary, possiblly composite condition> )
So, please don't close this issue. It will not be resolved by the linked commit.
On Wed, Jul 18, 2018 at 9:07 AM Boghyon Hoffmann [email protected] wrote:
I guess this feature will be available as of 1.58 according to c2d7bb9 https://github.com/SAP/openui5/commit/c2d7bb919da2c64e1ce45e5083dcddaf5796e54a .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SAP/openui5/issues/1512#issuecomment-405831855, or mute the thread https://github.com/notifications/unsubscribe-auth/AAngk5-2BXzsGmcSX5XvgLNvr79lkaEKks5uHt6vgaJpZM4NvS2p .
-- Roland Bouman blog: http://rpbouman.blogspot.com/ twitter: @rolandbouman linkedin: http://www.linkedin.com/profile/view?id=5142800&trk=tab_pro
I’m not sure why no one is answering your pull request question, but pull requests are accepted. However, perhaps more often for basic bug fixes than for entirely new features. Would be nice if someone from the team weighed in.
Hi @rpbouman Is there any news on this?
@rpbouman as @boghyon already wrote. We've introduced negated filter operators. From our point of view this satisfies your requirement. If you are aware of any scenarios not supported by them, feel free to post them here and we'll reopen this issue. And sorry for answering so late.
@flovogt I believe the scenario that brought me to this issue, is not supported by the solution provided. For ODatav4 there is the possibility of lambda filters over navigation properties. My requirements were to filter an entity for:
- the navigation property entity is not empty : /entity?$filter=NP/any()
- it is empty : /entity?$filter=not NP/any() As far as I know negating lambda filters is not supported. Please let me know if i'm mistaken.
(I have worked around this by using the"changeParameters()" function on the binding)
Thanks @hannaol for providing this scenario. I'll reopen the issue and the responsible team will discuss this requirement.
Hello all! Do we have any updates on this issue? We are having the same difficulty negating Lambda functions.
Hi @matheusbrasil,
unfortunately not.
Best regards Mathias.
7 years after ticket creation. And it's still not there. So sad.