Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Multiple connections are already created in qliksense. I have those connection name in excel sheet(Connection.xlsx) like
ConnectionName
Connection1
Connecton2
Connection3
Now I need to read these connection name from "Connection.xlsx" and include them in Qlik script like
LIB CONNECT TO 'Connection1';
LIB CONNECT TO 'Connection2';
LIB CONNECT TO 'Connection3';
Can anyone please suggest how I write script to include all connections?
Thanks.
Load * Inline [
Connection
Connection1
Connection2
];
For each i in FieldValueList('Connection')
LIB CONNECT TO '$(i)';
// Add your load scripts here
Next i;
Load * Inline [
Connection
Connection1
Connection2
];
For each i in FieldValueList('Connection')
LIB CONNECT TO '$(i)';
// Add your load scripts here
Next i;
Just thought of trying this
Sub Connection1
LIB CONNECT TO $(vConnection);
//Respective Query
End Sub
Sub Connection2
LIB CONNECT TO $(vConnection);
//Respective Query
End Sub
Sub Connection3
LIB CONNECT TO $(vConnection);
//Respective Query
End Sub
Set vConnectionlag=1;
Connections:
LOAD
ConnectionName
FROM [lib://Connections/Connections.xlsx]
(ooxml, embedded labels, table is Sheet1);
For each vConnection in FieldValueList('ConnectionName')
Let vConnect='Connection'&'$(vConnectionlag)';
Call $(vConnect)
vConnectionlag=$(vConnectionlag)+1;
Next vConnection