Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I'm new in qlik sense and I'm trying to work with qlik programmatically.
I'm trying to set selections for field with month names (on russian language).
And i can do it by next code and it works:
-- only 1 value i can select by next command
app.field(fieldName).selectMatch('фев', true);
-- by qElemNumber
app.field(fieldName).select([0,1,2,3]);
But it not appropriate for me for some reasons.
----------
I want to select values by something like next.
app.field(fieldName).selectValues([{qText: 'янв'},{qText: 'фев'}], false, false);
app.field(fieldName).selectValues([{qNum: 1},{qNum: 2}], false, false);
app.field(fieldName).selectValues(['янв', 'фев'], true, true);
But it not works for me.
Please help me with right command.
After Skype conversation we've discovered that issue was in input data, Apllying Trim function in the data load script solved the problem.
After Skype conversation we've discovered that issue was in input data, Apllying Trim function in the data load script solved the problem.
Hi,
Just want to know, where all we can write this code and how this is integrated with qlik sense apps.
Thanks
Thanks to Anatoly!
Right syntax is:
var myApp = qlik.currApp();
var fieldName = "Месяц";
myApp.field(fieldName).selectValues([{qText:"янв"},{qText:"фев"},{qText:"мар"},{qText:"апр"}], false, false);
And in the dataload block we made next changes:
LOAD
**
trim(Месяц) as Месяц,
***
Maybe it will help to someone.
Hi,
Presentation video:
Qlik Sense in 60 - Extension Objects - YouTube
For example, extension for working with selections:
currentSelections/currentSelections.js at master · ardwork/currentSelections · GitHub
For more information look here:
https://help.qlik.com/en-US/sense-developer/3.0/Subsystems/APIs/Content/FieldAPI/QField.htm