Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm fairly new to Qlik and I'm building a .NET application that connects to a Qlik sheet and is suppoused to extract underlying data from barcharts/combocharts. I'm able to pull the data from the charts via HyperCubePages however the sheet itself has several listbox objects that filter the data displayed on charts - want I want to achieve is to apply the filters (listbox selections) and retrieve the data from the charts.
var uri = new Uri("myQlikInstanceUri");
var location = Location.FromUri(uri);
location.AsNtlmUserViaProxy();
using var hub = location.Hub();
var appIdentifier = hub.GetAppList().First(x => x.AppName = "MyAppName");
var appConnector = location.App(appIdentifier.AppId);
var sheet = appConnector.GetSheets().First(x => x.Id == "mySheetGuid");
var listBox = sheet.GetChild("listBoxGuid") = as Listbox;
// Retrieve listbox possible values
foreach (var listboxItem = listbox.GetAllListObjectPagers())
{
var data = listboxItem.GetAllData();
foreach (var dataItem in data)
{
// get possible listbox values
}
}
// How to apply value selection to ListBox to apply filtering on barcharts/combocharts?
I'd be greatful if anybody had any experience with it and would like to share 🙂
The listbox is a visual object that represents a field. What you want to do is interact directly with the Field, not the Listbox. For example:
var field = appConnector.GetField("myfield");
field.Select("foo");
-Rob
The listbox is a visual object that represents a field. What you want to do is interact directly with the Field, not the Listbox. For example:
var field = appConnector.GetField("myfield");
field.Select("foo");
-Rob
Thank you, exactly what I've needed 😉