Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

berndpodhradsky
New Contributor II

.NET API Qlik Sense GetPossibleValues

Hi!

In QlikView there used to be methods such as "GetPossibleValues" and "GetAllValues" etc on a field. How can I achieve the same thing with Qlik Sense? I know that the IField interface carries methods to select possible values etc but I just want to get an array of values, not actually select them.

Any idea where to start?

Bernd

4 Replies
Employee
Employee

Re: .NET API Qlik Sense GetPossibleValues

I think the typical way to do that would be to go through an AppField instance. It provides you with methods like AppField.GetExcluded‌ and AppField.GetOptional. I'm not sure about the the semantics of "GetPossibleValues" in QlikView, but I think GetOptional would be what you want (possibly combined with AppField.GetSelected‌.AppFields are constructed from the App through this method: AppExtensions.GetAppField

An example could look something like this:

var countryField = app.GetAppField("Country");

var page = new NxPage(){ Height=20, Width=1, Top=0, Left=0 };

var selectedCountries = countryField.GetSelected(page);

berndpodhradsky
New Contributor II

Re: .NET API Qlik Sense GetPossibleValues

Thanks for pointing me in the right direction - now works perfectly fine, great!

berndpodhradsky
New Contributor II

Re: .NET API Qlik Sense GetPossibleValues

Again, thanks for giving me that hint - could you please have a look at the following thread, where I have another question?

Total Cells via GetData

Thanks,

Bernd

Employee
Employee

Re: .NET API Qlik Sense GetPossibleValues

Done! I just posted an answer on that thread.

Community Browser