Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
DanPe
Contributor
Contributor

[.NET SDK] Perform selection on ListBox and reload barcharts/combocharts data

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 🙂 

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

DanPe
Contributor
Contributor
Author

Thank you, exactly what I've needed 😉