Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
JShum
Contributor II
Contributor II

can't get qlik.app.field.selectValues(array, toggle, softlock) to select value by qText value

I am trying to use qlik.app.field.selectValues(array, toggle, softlock)  inside an extension and can't get it to work

I am doing it as follows.  Is it possible?  What am I doing wrong

var qApp = qlik.currApp(this);

qApp.field('XXXXXX').selectValues([{qText: "11001"}], true, true);

I have also tried

qApp.field('XXXXXX').selectValues([{"11001"}], true, true);

where 11001 is the qtext value and I have blanked out the field name but XXXXXX is the field name
I can't seem to select the value where the field value or qText value is 11001.  Nothing gets selected using the two ways I have tried

This seems to work but the value selected for index 0,1,2 is not what i would have expected
qApp.field('XXXXXX').select([0, 1, 2], true, true);

And this selects everything
qApp.field('XXXXXX').selectAll(); selects all

I did not get the app variaible by using qlik.OpenApp  Is that the problem?

Thanks
Janet




Labels (2)
1 Reply
JShum
Contributor II
Contributor II
Author

Update: toggleSelect is not supposed to be used to find a specific value  but it seems to find the value

https://help.qlik.com/en-US/sense-developer/May2023/Subsystems/APIs/Content/Sense_ClientAPIs/Capabil...