Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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);
Thanks for pointing me in the right direction - now works perfectly fine, great!
Again, thanks for giving me that hint - could you please have a look at the following thread, where I have another question?
Thanks,
Bernd
Done! I just posted an answer on that thread.