Skip to Content
avatar image
Former Member

CDS Associations with filters

I have created two CDS views. One is header and other is Item. Defined a relationship between these two views using association. Created Odata service having navigation between header and item using @OData.publish:true. How to pass parameters in CDS Associations. Or how to pass filters in associations except on condition of associations.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 31, 2017 at 02:59 AM

    Defining a filter in the on condition of the association will affect all the places which are using the association.

    while if you want to have a one-time behavior, you could specify the filter or parameter where you're using it.

    e.g. (imagine the _note is an association, )

    // prefix parameter with colon
    _note[ language = :langu ].text,

    // prefix param with $parameters
    _note[ language = $parameters.langu ].text,

    // using filter
    _note[ language = 'E' ].text

    // specify the cardinality

    _note[ 1:language = 'E' ].text

    Add comment
    10|10000 characters needed characters exceeded