cancel
Showing results for 
Search instead for 
Did you mean: 

UI5 Complex Expression Binding with filter

Attila
Active Participant
0 Kudos

Dear Gurus,

I have an XML View with a list and OData binding, and want to filter the list by default based on some dynamic criteria..

When I hardcode values '2017' and '05' the filter values arrive in the backend.

<List id="wageTypeList"
items="{ path: '/CorrectionHeaders', filters: [{ path: 'Pabrj', operator: 'EQ', value1: '2017' },{ path: 'Pabrp', operator: 'EQ', value1: '05' }],templateShareable:false }">

That is great, but I want to replace the hard coded values with dynamic values payrollYear and payrollPeriod coming from a JSONModel assigned to the view:

new JSONModel(
{
payrollYear: sYear,
payrollPeriod: sPeriod,
payrollYearPeriod: sYear + sPeriod
}

I've tried many syntaxes to replace the hard coded values, but all of them run into "Syntax error" or "Bad value" when executing teh view.

What would be the proper syntax, if it is supported ? Is it supported ?

Thank you

P.S.: I know how to bind the list manually in the view controller and filter the OData binding, but this is not how I want to solve, I want to use expression binding.

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

I think it is not supported yet.

Answers (0)