Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

bbainsslalom
New Contributor II

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

Re: Pass parameters to variable containing set expression

Seems like you have a typo

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

vs

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

Community Browser