Skip to main content

Suggest an Idea

Vote for your favorite Qlik product ideas and add your own suggestions.

Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Sub Routine Definitions

KingsleyJH
Partner - Contributor III
Partner - Contributor III

Sub Routine Definitions

Hi There,

Let's make Qlik Sense "open source". Let's create reusable functions that can be shared with one another! This wouldn't be difficult to implement... Let me explain:

I find myself reusing logic for different tables or fields, and this is cumbersome and inefficient. So I thought, "why don't I create a dynamic script that will carry out the logic I need and just enter in the necessary parameters (using subroutines and calling the function)". But this is only helpful for me as I know how to use the subroutine. What if we could add a definition/tooltip on a subroutine so that when a user types "call function_xyz", it presents the user with the tooltip, much like the standard Qlik functions that show a narrative and includes the syntax like this:

 Date#(text[, format])

This means we could create our own logic in qvs files and share with the community, saving time and money.

 

Some examples of where I have implemented dynamic subroutines:

1. make_ytd() - creates YTD, LTD, rolling 3 month, rolling 12 month fields in a table.

2. standardize_nulls() - Standardizing empty values in a table with "null()" - the reason for this, is sometimes the value can be an empty string, '', or null() or just doesn't have a value altogether, so this standardizes all the field values with a length of 0.

3. set_country() - (This is one specific to one of my clients). It converts the country field in a table to user-friendly values, eg. 'South Africa', 'Kenya'. Again, this is dynamic. All 3 examples work with different table names, different field names etc.

 

Hopefully, we can get this functionality as it'll mean we can share our scripts, and anyone can pick it up and start using it.

Thanks for your time

Kingsley

4 Comments
AndrewMcIlwrick
Luminary Alumni
Luminary Alumni

Great idea. We could use GitHub as the open source repo - which provides some control over pull request / merge approvals.

Ian_Crosland
Employee
Employee
 
Status changed to: Open - Collecting Feedback
Meghann_MacDonald

From now on, please track this idea from the Ideation portal. 

Link to new idea

Meghann

NOTE: Upon clicking this link 2 tabs may open - please feel free to close the one with a login page. If you only see 1 tab with the login page, please try clicking this link first: Authenticate me! then try the link above again. Ensure pop-up blocker is off.

Ideation
Explorer II
Explorer II
 
Status changed to: Closed - Archived