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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
Jennell_Yorkman
Employee
Employee

Did you know that you can hide fields in your data model from appearing in a field list?  Similar to how we have the ability to show and hide system fields, we can also show and hide fields that we create in the script.  When the Show System Fields checkbox is checked, system fields and all fields created in the script are listed.  When the Show System Fields is not checked, the system fields and any fields hidden using HidePrefix or HideSuffix will not be displayed in the list.

system fields.png

It is very easy to do.  In the script, you set the user defined variable HidePrefix to the text that will prefix fields that you would like to hide.  In the Call Detail Record Analysis demo, I created a sheet that acted as a report giving the user the ability to select the dimensions and measures they wanted to see in the table.

report.png

To create the list of dimensions and measures that I wanted to make available to the user, I created two new fields: _dimension and _metrics.  You can find details on how to create a customizable report in this blog.  These fields are used solely on the report sheet to display the dimensions and measures so I decided to hide them so that they did not clutter up my field list.  To do this, I set the HidePrefix variable in my script.

SET HidePrefix = '_';

This means that any field that starts with the underscore (_) character will be hidden from the field list.  I then created my new fields with the underscore prefix.

Dimensions:
LOAD * INLINE [_dimension
Call Date
Calling Number
Called Number
Cell Towers Visited
IMSI
Direction
First Cell Tower
Last Cell Tower
Manufacturer
Phone Type
Reason for Drop
Week
]
;

Metrics:
LOAD * INLINE [_metricsNo, _metrics
1, Calls
2, Distinct Cell Towers
3, Dropped Call
4, Handovers
5, Setup Time
6, Talk Time
]
;

So now when I view the field list with the Show System Field checkbox unchecked, I cannot see the fields I created using the underscore character in the Available Fields list.

field list2.png

This keeps the available fields list shorter and removes fields that I know the user will not need to use anywhere else in the application.  Users also have the ability to use HideSuffix as well which does the same thing as HidePrefix except this looks at the ending of the field name for the text that is set in the HideSuffix variable.  HidePrefix is an easy way to keep the field list in your application clean and hides fields that you may not want the user to use or that you may want to hide to eliminate confusion.

Thanks,

Jennell

25 Comments
SunilChauhan
Champion II
Champion II

thanks for this post.but what are the situation we could use hide suffix or hide prefix.

what are the advantage in data modeling

0 Likes
3,311 Views
aadil_madarveet
Partner - Creator II
Partner - Creator II

Thanks for the post. Jennell McIntire

chauhans85 - a very basic use case.. in perspective of the end user is.. hidden field can be used as filters in the dashboard.. and the selection in these filters will not appear in the Current Selection box.. which keeps the CS clean with showing only what the user has selected and not the default filter selections.. like Day/Week/Month/Year.. etc.. etc..

3,311 Views
Not applicable

set HidePrefix='%' and add %  in front of the fieldname name

Thanks

0 Likes
3,289 Views
juraj_misina
Partner Ambassador Affiliate
Partner Ambassador Affiliate

Thank youJennell McIntire. What annoys me is that "show system fields" only works when I have no table selected. Once I select a table, I don't see hidden fields even though I have "show system fields" checked.

0 Likes
3,289 Views
Jennell_Yorkman
Employee
Employee

That is odd.  I do not have that issue.  Make sure you have the latest version installed.

0 Likes
3,289 Views
juraj_misina
Partner Ambassador Affiliate
Partner Ambassador Affiliate

Sorry Jennell, I was not specific enough. Sheet properties window works as you describe. However when I create a chart object, then on Dimensions tab I can only display system fields when viewing all tables. When I select particular table the field list does not contain system/hidden fields even if "Show system fields" checkbox is checked. In Edit expression dialog everything works fine (althoug I have to check "Show system fields" prior to selecting a table, because once a specific table is selected in dropdown menu, the checkbox is disabled).

This is on QV 11.2 SR8.

0 Likes
3,289 Views
qlikpahadi07
Specialist
Specialist

can we hide the system fields on Access Point ?

0 Likes
3,289 Views
Not applicable

Very Useful! I recently discovered this possiblity!

0 Likes
3,289 Views
raviityou
Partner - Creator
Partner - Creator

Thanks very help full in Add-hoc reporting

1829
0 Likes
3,292 Views
Not applicable

Hi Jenell,

I followed the instructions and got it to work. However, I am trying to have the _dimension selections to show up in the Current Selections box so I removed the "SET HidePrefix = '_'" condition from the script. Yet the field is still not displayed in the Current Selections box. It used to display it before I added the hide prefix.

Thanks!

Ana

0 Likes
3,292 Views