Qlik Community

QlikView Documents

QlikView documentation and resources.

Announcements
Document boards are being consolidated, this board no longer allows NEW documents READ MORE

show field n from table Y

cancel
Showing results for 
Search instead for 
Did you mean: 
kristof_j
Creator II
Creator II

show field n from table Y

Hi 

Years ago I saw an app that showed the first n fields. The list boxes had a place in the app and if you loaded different data, the list boxes would adapt with the current fields.

Maybe it was done with an excel which listed the fields. But still, how do you do this? 

I want to load data in the same qvw but I don't want to change the list boxes every time. It's mostly for colleagues who don't have advanced QV-skills.

Comments
mall1m
Partner - Contributor III
Partner - Contributor III

Add in your script these variables

 

/* Variables for custom listbox */
Set vField1 = ='['&subfield(concat(DISTINCT $Field,'|'),'|',1)&']'; // =$(vField1)
Set vField2 = ='['&subfield(concat(DISTINCT $Field,'|'),'|',2)&']'; // =$(vField2)
... and so on

And put the following expression in your listbox

=$(vField1)
=$(vField2)

... and so on 

0 Likes
Sue_Macaluso
Community Manager
Community Manager

@kristof_j  Hi, This question is better suited in the discussion forum vs. a document forum. Unfortunately, I cannot move from a document to the discussion forum.  Here is the link to QlikView discussions:  https://community.qlik.com/t5/New-to-QlikView/bd-p/new-to-qlikview 

Version history
Last update:
‎2019-12-13 03:52 AM
Updated by:
Contributors