Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
sarfaraz_sheikh
Contributor III
Contributor III

How to use QFieldSelections() API in Mashup

Dear Folks,

Can you please help regarding How to use Below API in Mashup as i saw there is no example given in Qlik help site for these API. 

QFieldSelections()

what i want to achieve is if i select any customer then it should set in one variable same as we do in Qlik like below. 

vSelectedCustomer=GetFieldSelections([Customer Name);

Now we can achieve these in mashup as i am new to web technologies and my knowledge is very limited into CSS HTML and Javascript. Help would be  much appreciated.

 

Cheers 

Sarfaraz 

 

 

 

2 Replies
Aiham_Azmeh
Employee
Employee

Hi @sarfaraz_sheikh ,

I would suggest you to use `createGenericObject` https://help.qlik.com/en-US/sense-developer/September2019/Subsystems/APIs/Content/Sense_ClientAPIs/C... ex:

app.createGenericObject({
  user: {
    qStringExpression: "=GetFieldSelections([Customer Name])"
});

The selectionState method doesn't have a field filter

 

I hope this helps

sarfaraz_sheikh
Contributor III
Contributor III
Author

Hi AAZ,  Thanks for your reply. Its new learning for me .

Can i put generic object into variable like below. Also i did not understand these Sentence "The selectionState method doesn't have a field filter"

var vSelectedCustomer=app.createGenericObject({
  user: {
    qStringExpression: "=GetFieldSelections([Customer Name])"
});

 

What i want to achieve is ..I have created 2 web pages  one for IT department and second one is for HR department ....if user select any customer from [customer name] field and if selected user belongs to IT department then IT department web page will be visible ..similarly for HR department as well. 

IT and HR these two values in one field called "Department"..So i want to put selected "Customer Name's department into variable so that i can switch on respective web page accordingly. 

Cheers

Sarfaraz