Conditionally execute filter

#1

Hello,
I have this filter: myfield eq '${security.user.roles[0]}'

But if '${security.user.roles[0]}' eq 'admin' the filter must be skipped because admin can view all records.

I have tried to add in filter '${security.user.roles[0]}'='admin'
But I get a bad request, how can I do it?
Thanks,
Mario

0 Likes

#2

Hi Mario,

Maybe you can have two separate invokes with condition if the user is admin or not. The invoke for admins will not have $filter parameter.

Best Regards,
Vladimir

0 Likes