Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

List Box sync

I have two list boxes, one lists our customer's names and one lists the customers code (A001 format) in our system. At present these are sorting in alphabetical order which is fine but reading in line between the two they do not sync. I wish to leave the customer code in alphabetical order but sync the names to them.

11 Replies
Anil_Babu_Samineni

Try to use sort with load original from sort tab

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ToniKautto
Employee
Employee

I think the clearest solution is to enumerate the values during load. This will keep your front-end nice and clean, and allow accomplishing the required sort by sorting the field numerically instead of text based or with an advanced sort expression. See attached fro an example.

trdandamudi
Master II
Master II

In the 'Name' list box go to 'Sort' tab and follow as below:

ListBox_Sort.jpg

Note: As Toni mentioned below, my option works only if Customer is a numeric value,

trdandamudi
Master II
Master II

It was a mistake, I thought it was numeric... I will update the post.....

martinpohl
Partner - Master
Partner - Master

so if isn't numeric use maxstring(Customer) instead.

Each customer number has one text field, so each value will get the description from the customer field.

Regards

ToniKautto
Employee
Employee

MaxString() returns a text. It is not a valid expression for sorting, as a number is required.

martinpohl
Partner - Master
Partner - Master

for me it works

Unbenannt.PNG

the field Dim1num is sorted by the alphabetic order of Dim1

Regards

ToniKautto
Employee
Employee

From that image I can not tell exactly what configuration you have applied. Can you provide the sample file?

MaxString() returns a dual value, but for this value to be possible to interpret as a number the field must have been enumerate at some stage. Num(MaxString('A')) for example returns a NULL values, since the max string of a text can not be anything else than a text. So for pure text values MaxString() can not be used in sort expressions.