Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jpjust
Specialist
Specialist

"Tipo" in License Monitor

All,

I am reviewing the License Monitor app and I noticed the following code with tipo.

Can some one please help me to understand about "tipo"?

For Each tipo in 'User','Professional','Analyzer'
LET f_unused = '[Unused UserId' & if(tipo='user',']',' $(tipo)]');
LET f_quarantine = '[Quarantined UserId' & if(tipo='user',']',' $(tipo)]');
LET tipo_lower = lower(tipo);

Thanks

3 Replies
Bastien_Laugiero

Hello, 

Looking at the script here is my understanding. 

The variable "tipo" is used in the for each loop to use the following rest connection:

  • 'monitor_apps_REST_license_User'
  • 'monitor_apps_REST_license_Professional'
  • 'monitor_apps_REST_license_Analyzer'

In the for each expression there is only three loop. One of User, one of Professional and one for Analyzer.

The end goal is to populate data for the following fields 

  • User Access Created
  • User Access Modified
  • User Access Modified by
  • User Access Quarantined
  • User Access Token Count
  • Allocated Access Type
  • UserId
  • Unused but Allocated UserId
  • User Access Last Used
  • Quarantined UserId
  • User Access Quarantine End
Bastien Laugiero
If a post helps to resolve your issue, please mark the appropriate replies as CORRECT.
jpjust
Specialist
Specialist
Author

Thanks Bastien.

Is the variable Tipo defined elsewhere? Or is the variable just defined on the for each loop itself?

If I take the full code outside (license_user tab) of the License app and run it separately, it don't return any data.

Trying the understand the code / logic behind the license app.

Thanks

Bastien_Laugiero

Hi, 

The "license_user" is part of the tab capturing some the most important data in the license monitoring app. 

The "root" tab in the license monitor is probably the one called "QSR" (just above the "license_user" tab). The QSR tab calls the functions defined in the tab "license_user", "license_login", "user", "license_access", "license" and "app".

In this same QSR tab there is a "if" function at the end of each loop that basically says that if any called function return 0 data then the script will terminate.

So as the function defined in the "license_user" tab is the first one called, the script will pretty  much immediately terminate if you take the code of it as no data will be returned. 

Hope this is clear enough! 

Bastien Laugiero
If a post helps to resolve your issue, please mark the appropriate replies as CORRECT.