Skip to Content
author's profile photo Former Member
Former Member

getEntitySetMethod -> passing 2 filter values

Hi experts,

i want to pass to the getEntitySet method of my service 2 filter values

?$filter=PAR1 eq '01'&$filter=PAR2 eq '02'

But how can I access both filters in my service implementation. In the input filter string only the last value is inserted (PAR2 eq '02').

thanks for support.

br,

christoph

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 21, 2016 at 04:04 AM

    You are using wrong URL

    The correct URL should be ?$filter=PAR1 eq '01' and PAR2 eq '02'.

    Refer to Section 4.5 of http://www.odata.org/documentation/odata-version-2-0/uri-conventions/

    There are multiple ways to access the filter values, filter string being the most elementary.

    A better option can be

    lt_filters = io_tech_request_context->get_filter( )->get_filter_select_options( ).

    Refer to How to Develop Query Options for an OData Service Using Code-Based Implementation for sample.

    Message was edited by: Atanu Mallik

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 21, 2016 at 04:35 AM

    Hello Chris,

    Please pass as below and check.

    ?$filter=PAR1 eq '01' and PAR2 eq '02'


    Regards,

    Ashwin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Ashwin Dutt R

      Hi,

      one question occured after implementation.

      I have oModel which i set to the list item.

      listItem.setModel(oModel);

      In my xml view i refer to the {/KennzahlSet}. But how can I pass the filter objects now? In the gui i have no chance to do this?

      Thanks for support.


      BR,
      Christoph

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.