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

List box expression null remove

Hello all,

I have created a list box with an Employee field.  I created an expression which works.  It shows the Employee and the count of Assets they have.

=If(Count(DISTINCT {<status = {'Active'}>}Asset_ID)>1,Count(DISTINCT {<status = {'Active'}>}Asset_ID))

My issue is the counts that aren't greater then 1 have a dash       next to the Employee field.  I don't want those to show up on the list.

Do you know how I can remove them?  I only want to see Employee 1 below

EmployeeAssetstatus
1215369Active
136985Active
236895Active

I see in list box

1      2

2      -

Thank you for your assistance.

Kim

1 Solution

Accepted Solutions
parimikittu
Creator II
Creator II

Hi, If you want to have only the emplpoyees which has more than 1 Asset_ID? You also need to have the similar expression for Employee as well. create a list box with expression below:

aggr(if(Count(DISTINCT {<status = {'Active'}>}Asset_ID)>1,Employee ),Employee)

and then in expression tab give ur count logic "Count(DISTINCT {<status = {'Active'}>}Asset_ID)"

check this doc

How to show List box values conditional?

View solution in original post

4 Replies
ger_alegria
Partner - Creator
Partner - Creator

Try with:

=If(Count(DISTINCT {<status = {'Active'}>}Asset_ID)=>1,Count(DISTINCT {<status = {'Active'}>}Asset_ID))


When you are evaluating you only take when the count is > 1, so if is only one value you count anything.

kstroupe
Creator
Creator
Author

Thank you for your Quick response.  I put that in and it turns all the expression values to dashes. Here is what I was getting.  Then I put a picture of the change.

Thanks

parimikittu
Creator II
Creator II

Hi, If you want to have only the emplpoyees which has more than 1 Asset_ID? You also need to have the similar expression for Employee as well. create a list box with expression below:

aggr(if(Count(DISTINCT {<status = {'Active'}>}Asset_ID)>1,Employee ),Employee)

and then in expression tab give ur count logic "Count(DISTINCT {<status = {'Active'}>}Asset_ID)"

check this doc

How to show List box values conditional?

kstroupe
Creator
Creator
Author

Thank you this worked perfectly.  I'm sorry I wasn't able to find the example you gave me.  I'll mark it for future reference.  Have a great day.