Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am duplicating a small extension that allows for multiple inputs into a selection filter. The code is below. Any reason it breaks on duplicate?
define(['jquery', 'qlik', 'css!./FEI-SelectionsApplier.css', './properties'], function ($, qlik, cssContent, properties) {
return {
definition: properties,
paint: function ($element, layout, jquery,properties) {
app = qlik.currApp();
console.log(layout);
var buttonHTMLCode = 'Apply Selections'+((layout.field=='')?'':' to '+ layout.field)+'';
var textboxHTMLCode = '';
$element.html(''+buttonHTMLCode+''+textboxHTMLCode+'');
addOnActivateButtonEvent($element,layout,app);
}
};
});
//Helper funciton for adding on a "qv-activate" event of button/link
var addOnActivateButtonEvent = function ($element,layout,app) {
$("#applySelections-"+layout.qInfo.qId).on('qv-activate', function () {
console.log(0);
var selectionsInput = document.getElementById("selectionsTextboxArea-"+layout.qInfo.qId).value.split('\n');
selectionsInput = selectionsInput.filter(function(n){ return n != "" });
selections = layout.isNumeric ? selectionsInput.map(function(item){return parseFloat(item);}) : selectionsInput;
console.log('Selections to be applied are:', selections);
app.field(layout.field).selectValues(selections, true,true);
});
};
I unfortunately cannot reproduce the issue. My guess is that you are missing some of the needed files in the wbfolder.wbl file (https://help.qlik.com/en-US/sense-developer/June2019/SubSystems/Dev-Hub/Content/Sense_Dev-Hub/Howtos...) - dev-hub start page relies on it for duplicating extensions, the functionality will only copy over the files listed in the wbfolder.wbl.
I hope this helps
@danelooman check the newly created extension's qext filename - it needs to be unique.
Can you give us more informations like what Qlik Sense version and product are you using, how are you duplicating the extension?
I am duplicating it in the Dev Hub by right clicking and selecting duplicate. Below are my current versions. The extension works before being duplicated.
Qliksenseserver 13.32.2
.NET SDK 13.15.0
About Service 1.17.0
App Migration Service 4.8.2
Broker Service 5.21.0
Capability Service 1.6.6
Client 6.105.4
Data Preparation Service 2.114.1
Dependency Graph Service 1.1.1
Dev Hub 1.6.0
Download Preparation Service 1.2.4
Freya Client Service 2.11.0
Licenses service 1.19.1
Mobility Registrar Service 1.0.0
Monitoring Apps 7.18.0
Notifier service 1.0.1
ODAG Service 3.8.0
Precedents Service 0.57.1
Printing Service 15.6.1
Proxy 12.17.0
QIX Engine 12.388.2
Qlik DataMarket Connector 2.9.1.8
Qlik Essbase Connector 1.3.0
Qlik Management Console 1.49.2
Qlik ODBC Connector 6.16.1
Qlik REST Connector 2.15.0
Qlik SalesForce Connector 14.8.1
Qlik Sense Hub 0.36.6
Qlik Web Connectors 0.53.0
Repository 25.15.2
Scheduler 18.2.0
Service Dispatcher 15.7.0
Web Extension Service 1.8.0
Web Extensions 1.5.0
I unfortunately cannot reproduce the issue. My guess is that you are missing some of the needed files in the wbfolder.wbl file (https://help.qlik.com/en-US/sense-developer/June2019/SubSystems/Dev-Hub/Content/Sense_Dev-Hub/Howtos...) - dev-hub start page relies on it for duplicating extensions, the functionality will only copy over the files listed in the wbfolder.wbl.
I hope this helps
you are correct. I found out it was not copying over a properties.js file so I had to reproduce it and it worked like a charm. Thank you.