Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pass parameters to variable containing set expression

In Qlik Sense 3.2.2 I'm trying to dynamically generate a set expression in order to reduce repetitive coding in my app's sheets. I've seen some examples of this but only in a QlikView context.

Here is my set up:

Sheet variable vSheetId is defined as:

=MaxString({1<AppName={$1}>,SheetName={$2}}SheetId)

From another expression, I call this variable and pass the appropriate values for the App and Sheet IDs I want to look up:

=$(vSheetId('IRL', 'Overview'))

These values are in a data island table in my model. There are multiple combinations of these IDs that I need for different objects in my app.


I've tried several variations on this, but none have worked. If I simply hard code the set expression instead of using the $1 and $2 parameters, everything works. For example this works: =MaxString({1<AppName={IRL}>,SheetName={Overview}}SheetId)

Is what I'm trying to do even possible in QlikSense? If so, where am I wrong with my syntax, or is there an alternative way to do this?

1 Reply
sunny_talwar

Seems like you have a typo

=MaxString({1<AppName={$1}>,SheetName={$2}}SheetId)

vs

=MaxString({1<AppName={$1},SheetName={$2}>}SheetId)