Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm struggling to exclude certain names from a Listbox I have created - Field is CVsSent.CONSULTANT. As it stands, the listbox is displaying every person's name in the company but i'd like to remove / hide a few of them if possible so they no longer feature in the box.
For example:
John
Paul
James
Sarah
Julia
Jon
Simon
Andrew
How would I go about removing Jon, Simon and Andrew so they are no longer displayed in the Listbox? I'm guessing by adding an expression in the ListBox properties but each time I do, it doesn't work. I think it's something basic but I'm very new to this.
Thanks so much,
Lindsay
Hi,
Make sure you _don't_ add this expression on the expression tab.
Add the expression in the following way: on the tab "general" of your listbox you see the dropdown where you choose which field should be active in the listbox. There use the lowest option, named "<Expression>". When selected, a dialogue popsup where one of our expressions should be placed to get it working 🙂
Hope it helps!
Hi,
I'm using this expression in listbox to do the same thing :
=AGGR(ONLY({<NodeName-={'AAAA','BBBBB','CCCC','.....',}>} NodeName),NodeName)
Replace Nodename with your field and write name in the set analysis
Add the following expression in your listbox (assuming your fieldname is indeed CVsSent.CONSULTANT)
if(
CVsSent.CONSULTANT <>'Jon' and
CVsSent.CONSULTANT <>'Simon' and
CVsSent.CONSULTANT <>'Andrew' ,
CVsSent.CONSULTANT)
Note by the way that users may probably add their own listboxes (when viewing this application on the Accesspoint). Perhaps a thing to keep in mind while adding security (if needed)
thanks for coming back to me. I've tried this but all names are still displayed and each name in the box now has a Null Symbol next to it. i.e. -
Expression now looks like this:
=AGGR(ONLY({<CVsSent.CONSULTANT-={'Jon','Simon','Andrew',}>} CVsSent.CONSULTANT),CVsSent.CONSULTANT)
Result is:
John -
Paul -
James -
Sarah -
Julia -
Jon -
Simon -
Andrew -
Hi,
Make sure you _don't_ add this expression on the expression tab.
Add the expression in the following way: on the tab "general" of your listbox you see the dropdown where you choose which field should be active in the listbox. There use the lowest option, named "<Expression>". When selected, a dialogue popsup where one of our expressions should be placed to get it working 🙂
Hope it helps!
Hi, thanks also for replying. I've done absolutely what you have suggested but now what happens is every name that i want to remain in the list is now duplicated and the ones i want to remove have a null symbol, i.e. - next to their names.
So it looks something like this:
Alex Alex
Jon -
Appreciate the help.
thx,
Ok... Are you sure that the fieldname you use is correct? And/or there is no syntax error in your expression?
I added a sample qvw where both my expression is working and the aggr/only expression.
Hope it helps if you check the expression in this sample qvw...
If not, don't hesitate to let me know.
You're absolutely right!! I was going to List Box Properties and going straight to the Expressions tab, then 'Add'. I've been pulling my hair out on this one for the whole morning lol so thank you.
Could you explain what the difference is between doing it the way you suggested and the way i tried. i.e. why does it work your way and not through the expressions tab?
Thanks again.
Because expression tab add an expression using your listbox as a dimension.
It's like a straight table.
Using an expression instead of a field for your listbox will change the dimension.
I can imagine you immediately went to the expressions tab.
I think it works as follows:
- the place I suggested is the (only) place to define which attribute (or expression) is the attribute for your listbox
- the place on the expression tab is a way to add extra information.
An example is that in the expression-tab you add count(FIELDNAME) which is the same as the checkbox "show frequency" that you have on the "general tab"...
I can imagine that sometimes you have a more complex expression than a count... so in that case you can do what you want on the "expressions tab"
PS: I'm curious what your hairdo looks like currently 😛