Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How Can I remove certain Items || Combine certain items from a List Box

Hi there,

I try to not to show all the items in a List Box.

For example, the List Box currently shows :

A

B

C

D

E

F

However, I would like to only show certain items, such as,

A

C

E

I can use "Expression" to get rid of only one item, such as "=if(DataField<> 'B',DataField)". But I cannot remove several items. How can I remove several items B, D, F?

Another question is how can I combine centain items into one item?

For example, I want to put "B, D, F" items into a new item which called "Total". How can I achieve this goal?

Thanks in advance,

Becky

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

try this for both of your questions:

the first part will list you the items A,C and E, while B,D,F will be included inTotal

if match(Datafield,'A','C','E')>0, Datafield, 'Total')

View solution in original post

6 Replies
sunny_talwar

May be this:

If(Not Match(DataField, 'B', 'D', 'F'), DataField, 'Total')

sunny_talwar

or like this:

If(DataField <>'B' or DataField = 'D' or DataField = 'F', DataField, 'Total')

Anonymous
Not applicable
Author

try this for both of your questions:

the first part will list you the items A,C and E, while B,D,F will be included inTotal

if match(Datafield,'A','C','E')>0, Datafield, 'Total')

Kushal_Chawda

=if(match(Field,'B','D','F'),'Total',Field)

Not applicable
Author

The one above has error. This solution is working. However, put AND instead of OR in between. Thanks so much Sunny!

Do you know how to group B, D, F into one item?

Not applicable
Author

Thanks Rudolf. I believe your solution is the simplest one and great. Thanks so much!! n