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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
jeanphi45
Contributor
Contributor

Getting Started with tSetGlobalVar and tJavaRow components

I 'd like to count non empty fields of a column from a sql table
Question 1 : why , when i want to add tSetGlobalVar , the example is between quotes ? i only want to initialise a integer variable to 0.
Question 2 :
how add 1 to this variable when the field is not null ?
Question 3 : how display this variable ?
Thanks in advance
Labels (2)
1 Reply
alevy
Specialist
Specialist

1. If you mean the value example, because it's a string. You can put any expression you want there.
3. To retrieve, use the expression: (YourDataType)globalMap.get("YourVariableName") e.g. (Integer)globalMap.get("Counter")
2. For example: ((Integer)globalMap.get("Counter"))==null?1 0683p000009MPcz.pngInteger)globalMap.get("Counter")+1