Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

List Index No in Listbox

Hi,

Is there any way to get the position no (list nidex no) of an item in a list box. I tried using Match function but its not working as there are repeat entries. The field on which the list box is generated its primary key for 2 tables also, which restricts using match and index functions. Is there any other way for this. Kindly help.

15 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Can you please describe more in detail with example.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Kaushik,

My requirement is: I have a QV document from where I have to prepare a report. In the Main document I have a chart which can be changed once any value selected in a list box.

In the list box there are more than 100s of items, so I used the Loop Page Over Possible Values option in the report to get all charts. Along with that I need to give the serial nos of the chart also depending upon the selected item present in the list box (the index no of the item in the list box will be the serial no).

I cant use Match function to get the index no of the selected item, as there are multiple entries of a single item, like one item may appear more than one time.

Also the field on which th elist box is made, is a common field between the two tables I upload to QV document.

Example: Table one has the Fields "Emp ID, Name, Address", Table 2 has "Emp ID, City, Country".

When uploading the 2 tables are getting joined by EMP ID as its common adn acting as the key. So the Match function is not working.

Is there any other way I can get the index no of the Selected item directly from the List box.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Can you please upload the QVW file. It will help me to understand it in better way.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
SunilChauhan
Champion II
Champion II

use  rowno()-1 as Index in script

please see the attached format

Sunil Chauhan
Anonymous
Not applicable
Author

Hi,

As I wont be able to provide  the original document, I have created a sample. Please go to the Edit Report to see the report and please suggest to add a serial no (Highlighted in red) Thank You.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    I can not find any field called Serial number. Can you tell me what does this mean in your report.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Serial No is not a field. I want to generate a serial no for the charts like: Chart 1, Chart 2.

This serial no will as per the position of the KeyID in the list.

For Example: as FRT777 is present in 4th, so for the chart it will show Chart 4 in the report.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    You have used the "Month" field in loop, so your report will generate the 12 charts. So according to that the serial no should be from 1 to 12 i.e in accordance with month... am i right..?

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Yes, absolutely. But inplace of month, please consider KeyID in loop.