Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
retko1985
Creator II
Creator II

Using 2 fields in one listbox, but allow only selection of 1 field.

Hello,

please see attached doc.

When I make a selection, I want only code to be selected, but not a description.

Is it possible?

Thanks

10 Replies
kevinalvino
Partner - Creator
Partner - Creator

Hi Retko,

Use Alternate State.

Select the Description List Box ->Property -> Create new State.

Create alternate state in position where you haven't select anything.

It should be like this in the attached.

Best Regards,

Kevin

sudhirpkuwar
Partner - Creator II
Partner - Creator II

Something like this1.JPG

stigchel
Partner - Master
Partner - Master

In the general tab of the listbox properties just select the Number_Code field (no expression) then in the expression tab add an expression

='- '&Only({<Number_Code>} Description)

See attached

ListBox2fields1sel.png

retko1985
Creator II
Creator II
Author

Hi, Thank you for this, I was actually using it like this, but the problem is that I cannot search now by Description in a listbox, so I thought there might be another solution. Search like *AAA* wont give any results.

How can I search by description then?

Thanks

retko1985
Creator II
Creator II
Author

Can you upload a QVW please?

Thanks

sudhirpkuwar
Partner - Creator II
Partner - Creator II

Try this

It works for your search scenario

stigchel
Partner - Master
Partner - Master

Ok, slightly more complicated but...

In the general tab use an expression (instead of a field) like this

=Aggr(Dual(Only({<Number_Code>} Number_Code)&' - '&Only({<Number_Code>} Description),Only({<Number_Code>} Number_Code)),Number_Code)

ListBox2fields1sel2.png

retko1985
Creator II
Creator II
Author

Hi,

this is very interesting. Thank you. But unfortunately it messed up some other things:

In my listbox I use "Suppress horizontal scroll bar" - before this solution I had dots if the description was too long, not it just shows all ###### in all row of the listbox.

And another problem - When I select something else in another listbox, this listbox is reduced to just associated (white) values, and gray values dispensary.

See in attachment.

Thank you for help. !

retko1985
Creator II
Creator II
Author

Thanks, but unfortunately I would rather do it in the front end and not to concatenate fields.