Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
adam_westhusing
Contributor II
Contributor II

Get extended properties on GenericObject

I'm using the .NET SDK to traverse through the objects in a sheet and I'm encountering what appears to be a custom object type.  I'm trying to get extended properties for the object, but all that's being returned is the type and Id.  Can someone help me get information like the informationTooltip or the title for this object type?

foreach (IGenericObject child in sheet.Children)
{

  GenericObjectProperties props = child.GetEffectiveProperties();
  if (String.Equals(props.Info.Type, "basic-template"))
  {
    //???

  }

}

Labels (2)
1 Reply
Øystein_Kolsrud
Employee
Employee

To interact with such objects you have to rely on the generic get and set functions of the AbstractStructure class, and you'll need to know the path within the GenericObjectProperties structure to the information you are looking for. If the "informationTooltip" is at the root level of the GenericObjectProperties, then you can write like this:

var informationTooltip = props.Get<string>("informationTooltip");

You can find more information about the AbstractStructure concept here:

https://help.qlik.com/en-US/sense-developer/April2019/Subsystems/NetSDKAPI/Content/Sense_NetSDKAPI/H...

But you'll need a way to figure out what the property structure of your custom object looks like. One way is to use this tool:

https://help.qlik.com/en-US/sense-developer/April2019/Subsystems/Plugins/Content/Sense_Plugins/Getti...

That tool allows you to navigate the contents of a Qlik Sense installation and inspect objects and their properties (and layouts). Another, perhaps more light-weight solution, is to use the "developer menu" of the Qlik Sense Client. You can find more information about how to inspect property structures through that functionality here:

https://community.qlik.com/t5/Qlik-Design-Blog/Developer-menu-in-Qlik-Sense-client/ba-p/1471915