Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The selectValues method don't work on every fields which is strange.
Example code that doesn't work
app.field('FrånvarandePeriod').selectValues(["2016/2017"], false, true);
Even tried the longer version
app.field('FrånvarandePeriod').selectValues([{qText: "2016/2017"}], false, true);
It doesn't give any errors, just an empty selection
But this works
app.field('FrånvarandeMånad').selectValues(["jan"], false, true);
Same code but different values
Someone who knows what the problem can be?
Thanks
An easy way to check if a value has a numeric value is single configurator:
Example from Helpdesk Management app the Filed Dat with value 10/14/2010 is resulting in the URL as `&select=clearall&select=Date,40465` <= `40465`
Alternatively, you can check qNum from one of the values => https://help.qlik.com/en-US/sense-developer/April2018/Subsystems/APIs/Content/CapabilityAPIs/FieldAP...
Hi royal.87,
I will guess that some of the values you are trying to select have a numeric representation, that's why sometimes it's not working, see => https://help.qlik.com/en-US/sense-developer/3.0/Subsystems/EngineAPI/Content/Classes/FieldClass/Fiel...
You may need to send qIsNumeric and qNumber (numeric representation) for certain values.
An easy way out is to use instead the selectMatch method => https://help.qlik.com/en-US/sense-developer/3.0/Subsystems/APIs/Content/MashupAPI/Methods/selectMatc...
I hope this helps,
Thanks Aiham you answer helped me on the way .
I have several selections with different fields so the selectMatch wont help because it will only be the last value selected in the end.
It don't work when I try with qNumber instead of qText, I think i need to convert the values to some kind of date value.
An easy way to check if a value has a numeric value is single configurator:
Example from Helpdesk Management app the Filed Dat with value 10/14/2010 is resulting in the URL as `&select=clearall&select=Date,40465` <= `40465`
Alternatively, you can check qNum from one of the values => https://help.qlik.com/en-US/sense-developer/April2018/Subsystems/APIs/Content/CapabilityAPIs/FieldAP...
Awesome it works
I check if the value has qNum, if it does then i use that value instead of qText.
The solution Is for exporting and importing selections.
Thanks Aiham you are the best