Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need to Reload the data based on list box value selection

Hi All,


Goal: Need to Reload the data based on the selection made in list box at dashboard level.

data.PNG         test.PNG

Variable created using variable Overview dialog ==>   vAcc = getfieldselections(AC)

Result of variable would be - either ADMIN or USER.

Obsesrvations:

Though the variable vAcc is holding the value, but on reload the table is fetching 0 records.

dd.PNG

Please let me know if missing anything

(or)

Is there any way to achieve this?

Thanks in advance

9 Replies
sunny_talwar

Would you be able to share the sample you have been working with for us to take a look at it?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

In your script, change clause

WHERE ACCESS = '=vAcc';

into

WHERE ACCESS = '$(vAcc)';

I think i got what you were after, but that doesn't work in a script. $-sign substitution on the other hand will work perfectly, even in SQL statements. Note: make sure that variable vAcc always contains exactly one value.

Best,

Peter

Not applicable
Author

Hi Sunny pls find the attachment. App and Xls

sunny_talwar

May be try this with an on-select trigger on AC field

Capture.PNG

Attached application seems to be working. Try it out

Not applicable
Author

Thank you sunny. Its working fine.

Have one more Question.

I am trying to implement the same in Qlik Sense.

Can you suggest on this, as there are no direct triggers available in Qlik sense like Qlik View.

Thanks

Not applicable
Author

And also,why it did not work with the variable concept(Used Filed triggers).

Is there any specific reason for this or kind of implementation mistake?

Thanks

sunny_talwar

I think for Qlik Sense you will need an extension to get this done. I don't have much expertise in Qlik Sense to guide you in the right direction, but may be phaneendra.kunche can offer his advice regarding an extension that might help do this for you.

To answer your 2nd question. GetFieldSelection is a front end function. Whatever you have selected doesn't carry through to the back-end unless you have saved it as a value instead of a function.

HTH

Best,

Sunny

Not applicable
Author

Thank you so much sunny. will check the same

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You shouldnt declare the variable in script when you want to use that in calculation by taking input from frontend.

Your script should be.

LOAD Distinct ACCESS as AC

FROM

[..\TestData.xlsx]

(ooxml, embedded labels, table is Sheet1);

Data:

LOAD ACCESS,

     NAME,

     VALUE

FROM

[..\TestData.xlsx]

(ooxml, embedded labels, table is Sheet1)

where ACCESS = '$(vAcc)';

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!