Skip to main content Skip to complementary content

App fields

Makes it possible to show a list over selected values. You can have a subscription to get notified when updates have been made.

Selected values

Example: List selected values in Qlik Sense Desktop


	static void Main()
        {
        	ILocation local = Qlik.Engine.Location.FromUri(new Uri("ws://127.0.0.1:4848"));
        	local.AsDirectConnectionToPersonalEdition();
        	foreach (var entry in local.GetAppIdentifiers())
        	{
        		try
        		{
       			using (var doc = local.App(entry))
        			{
        				var fields = doc.GetAppFields();
        				foreach (var appField in fields)
        				{
        					var field = doc.GetAppField(appField.Properties.ListObjectDef.Def.FieldDefs.FirstOrDefault());
        					if (field == null)
        						continue;
        					var p = new List<NxPage> {new NxPage { Height = 20, Width = 1 }};
        					var dataPages = field.GetData(p);
        					foreach (var dataPage in dataPages)
        					{
        						var matrix = dataPage.Matrix;
        						foreach (var cellRows in matrix)
        						{
        							foreach (var cellRow in cellRows)
        							{
        								Console.WriteLine("## " + cellRow.Text + " - " + cellRow.State);
        							}
							}
						}
					}
				}
			}
        		catch (MethodInvocationException methodInvocationException)
        		{
        			Console.WriteLine("Error: {0} recieved {1}", entry.AppName, methodInvocationException.Message);
        		}
        	}
        	Console.WriteLine("Press enter to exit");
        	Console.ReadLine();
	}	

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!