Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I'm new to Qlik sense, I'm trying to load the data from Qlik Sense desktop. I could able to connect local Qlik Sense desktop application. I was referring to this document to load script but got stuck
Loading data into Qlik Sense ‒ Qlik Sense Developers
IApp app ;
public void createCustomScript()
{
string localizationScript = app.GetEmptyScript();
string newScript = localizationScript + "LOAD RowNo() AS value, 1 AS myDimension AUTOGENERATE 300;";
}
public ActionResult Index()
{
Uri uri = new Uri("http://localhost:4848");
ILocation location = Qlik.Engine.Location.FromUri(uri);
location.AsDirectConnectionToPersonalEdition();
var newAppIdentifier = location.HasAppWithName("Consumer Sales");
using (IHub hub = location.Hub())
{
Debug.Write($"the local product version {hub.ProductVersion()}");
createCustomScript();
}
Debug.Write($"the local product version {newAppIdentifier}");
return View();
}
Any help would be appreciated.
Thanks
Hi! You'll need to take the script you create in your method "CreateCustomScript" and use it as argument to the set the script of the app using IApp.SetScript Method. After you have done so, you need to trigger the script evaluation which will do the actual data load using IApp.DoReload Method.