Qlik Community

App Development

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

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
maheshA
Contributor
Contributor

Passing Parameter from dashboard to script or is there any way to achieve

Hello Experts, I have a scenario below,

Fields: 1) FY 2) Month 3) Fund

Fund example: 0HJ02020123, 0HJ02019123, 0HJ02018123, 0HJ02017123, 0KH02020123, 0KH02019123

, 0KH02018123

FY: 2020, 2019, 2018

On Dashboard, I have 2 filters:

                1) FY (I will use direct field from excel)

                2) Monitoring (this should be custom filter), values like "Expired", "Current", "Indefinite". (I tried Inline function to achieve)

 

When "Monitoring" selected "Expired" and FY=2020, i need the Funds only for Less than 2020 funds, and fund should be starts with “0HJ” that means:

"0HJ02019123, 0HJ02018123, 0HJ02017123"

 

When the select "Current" and FY=2020, Need only for this year funds. (In this scenario only fund value year is search criteria)

That means: "0HJ02020123, 0KH02020123"

 

When the select "Expired" and FY=2019, i need the Funds only for Less than 2019 funds and fund should be starts with “0HJ” that means:

" 0HJ02018123, 0HJ02017123"

 

When the select "Current" and FY=2019, Need only for this year funds. (In this scenario only fund value year is search criteria)

That means: "0HJ02019123, 0KH02019123"

 

Can you please suggest me some solutions.

 

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
maheshA
Contributor
Contributor
Author

Thank You guys. I got the solution.

Here is the variable i have created. as i mentioned earlier "Monitoring" field is getting from Inline function.(i can use this as filter)

=if(([Monitoring])='Current',  if( (GetFieldSelections([FY])=mid([Fund],9,2)),Fund),

    if(  ([Monitoring])='Expired',   If( (WildMatch([Fund],'0HJ*') and (GetFieldSelections([FY])>mid([Fund],9,2))),Fund),))

I believe no need of sending value to script.

 

Still i would love to learn is there any way we could pass it to script.. Happy to learn. 

 

Cheers.

View solution in original post

1 Reply
maheshA
Contributor
Contributor
Author

Thank You guys. I got the solution.

Here is the variable i have created. as i mentioned earlier "Monitoring" field is getting from Inline function.(i can use this as filter)

=if(([Monitoring])='Current',  if( (GetFieldSelections([FY])=mid([Fund],9,2)),Fund),

    if(  ([Monitoring])='Expired',   If( (WildMatch([Fund],'0HJ*') and (GetFieldSelections([FY])>mid([Fund],9,2))),Fund),))

I believe no need of sending value to script.

 

Still i would love to learn is there any way we could pass it to script.. Happy to learn. 

 

Cheers.