Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wardzynski
New Contributor III

Copy and paste selections from an embedded Qlik Sense object within a webportal as an URL with selections included

Hey Qlik Community,

Does anybody have experience and/or have previously implemented and coded a JavaScript code inside a Qlik Sense Mashup, that would

fetch the selection of a particular object (listbox) from the Qlik Sense mash-up itself?

I am not sure which of the API functions I should be using in order to recreate an URL with the selections included as follows:

https://domain.com/Folder1/OurFieldNameFromOurQlikSenseListboxObject/OurSelectedValueFromOurQlikSens...

Potential functions:

getData() - https://help.qlik.com/en-US/sense-developer/2.2/Subsystems/APIs/Content/BackendAPI/getdata-method.ht...


So basically:

1) User opens web-page with Qlik Sense visualisation and list-boxes.
2) User selects two fields
3) User can then press a URL hyperlink that includes the selections that was made in step 2.

Any kind of help would be very helpful as I can not find much about this topic in the community.

 

Thanks!

3 Replies
jelle_vervloess1
New Contributor III

Re: Copy and paste selections from an embedded Qlik Sense object within a webportal as an URL with selections included

hi daniel

so basicaly you want to be using the selection api to retrieve the selected objects right?

you can do this by getting

var selState = app.selectionState( );


this returns a selection state object wich is like this

QSelectionState ‒ Qlik Sense


yo will need to get the .QFieldSelectionsand then the qselected field.


after you get the fields and values you could easily post them to your next url trough string concatination


hope this helps.

jelle_vervloess1
New Contributor III

Re: Copy and paste selections from an embedded Qlik Sense object within a webportal as an URL with selections included

well this is going to get realy tricky if you don't know javascript fcourse

to see the output you would need to log the console when the state of the object changes for example

don't have the tools to help you atm srr

jelle_vervloess1
New Contributor III

Re: Copy and paste selections from an embedded Qlik Sense object within a webportal as an URL with selections included

wel if you include the qliksense mashup javascript file in the other web page the selections are saved and used again since your session is the same