Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

aggr only more than one value excluded in list box

I have a list box that is powered by an expression to hide 1 value.

=aggr(only({<[name]-={John}>}[name]),[name])

but i want to add a second name to this. I have tried...

=aggr(only({<[name]-={John, Alan}>}[name]),[name])


and


=aggr(only({<[name]-={John}, {Alan}>}[name]),[name])


With no luck

1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

did u try with single or double quotes?

=aggr(only({<[name]-={'John', 'Alan'}>}[name]),[name])

View solution in original post

10 Replies
Chanty4u
MVP
MVP

did u try with single or double quotes?

=aggr(only({<[name]-={'John', 'Alan'}>}[name]),[name])

tresesco
MVP
MVP

May be a simpler one, like:

=If(Not Match([name], 'John', 'Alan'), [name])

tamilarasu
Champion
Champion

As proposed by Chanty, you need to use single quotes around the names,

=aggr(only({<[name]-={'John', 'Alan'}>}[name]),[name])

Kushal_Chawda

=aggr(If(Not Match([name], 'John', 'Alan'), [name]),[name])

tresesco
MVP
MVP

@ Tamil,

No, it's not like that, I believe. It should work even without quotes since the values are not having spaces in between. Hence, the expression:

=aggr(only({<[name]-={John, Alan}>}[name]),[name])  should work fine as well.

tamilarasu
Champion
Champion

Hi Tresesco,

I agree. If there are no spaces in between the names, we can directly mention the names. Then why the same is not working in this case.? Any guess.?

Thanks.

tresesco
MVP
MVP

Without looking at the representative qvw, it would be blind guesses.

tamilarasu
Champion
Champion

. Just to be on the safe side, I always use single ( sometimes double ) quotes.

@matthewp  If possible, please post your QVW application.