on 07-11-2019 7:04 PM
I have a report that uses below formula.
if {?Day_Night} = 'All' then
(({?Position}='ALL' or {Command.category2} like {?Position} & "*") and {?Day_Night}='All')
else if {?Day_Night}={command.day} then
(({?Position}='ALL' or {Command.category2} like {?Position} & "*") and {?Day_Night}={command.day})
else if {?Day_Night}={command.night} then
(({?Position}='ALL' or {Command.category2} like {?Position} & "*") and {?Day_Night}={command.night})
The {?Position} parameter was a single selection thus far, but now I need to change that to allow multiple selections. I tried substituting "like" with "in" and although there was no error, the report did not show any data. Is there a way to use array method while still allowing the report to use "like" or " * "?
Something you might try is to change "like" to "startswith", which will work with the multi-select array.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Changed the formula like this and then changed the parameter to multiple selection. Now i'm getting the array error....
if {?Day_Night} = 'All' then
(({?Position}='ALL' or {Command.category2} startswith[{?Position}] and {?Day_Night}='All'))
else if {?Day_Night}={command.day} then
(({?Position}='ALL' or {Command.category2} startswith[{?Position}] and {?Day_Night}={command.day}))
else if {?Day_Night}={command.night} then
(({?Position}='ALL' or {Command.category2} startswith[{?Position}] and {?Day_Night}={command.night}))
Remove the brackets around {?Position} and put a space after "startswith". If {?Position} is multi-select, it will automatically be an array, so you don't need the brackets.
-Dell
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.