<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: .NET SDK Get Visualization behind Master Item in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-Get-Visualization-behind-Master-Item/m-p/1790171#M14010</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Thanks - I was aware of the approach you mentioned. But I infer from your answer that converting the &lt;EM&gt;MasterItem&lt;/EM&gt; to a &lt;EM&gt;Barchart&lt;/EM&gt; object is not possible, correct?&lt;/P&gt;&lt;P&gt;To explain why I ask this: if we have a function that takes a &lt;EM&gt;Barchart&lt;/EM&gt; object as parameter and does lots of things with that object and we want to extend this functionality to also support bar charts which have been added as master items, we have to rewrite the complete function, because we cannot get a &lt;EM&gt;Barchart&lt;/EM&gt; object from the master item. Am I right?&lt;/P&gt;&lt;P&gt;Bernd&lt;/P&gt;</description>
    <pubDate>Wed, 10 Mar 2021 16:50:05 GMT</pubDate>
    <dc:creator>berndpodhradsky</dc:creator>
    <dc:date>2021-03-10T16:50:05Z</dc:date>
    <item>
      <title>.NET SDK Get Visualization behind Master Item</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-Get-Visualization-behind-Master-Item/m-p/1790069#M14005</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;When querying master items from the SDK I am able to get items of type &lt;EM&gt;MasterItem&lt;/EM&gt;. Is there any chance to get the actual i.e. &lt;EM&gt;Barchart&lt;/EM&gt; object (if it's a barchart, for instance) from that master item (i.e. the same object I would get when calling &lt;EM&gt;GetGenericObject&lt;/EM&gt; with the ID of an item that is actually displayed on a sheet)?&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 14:15:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-Get-Visualization-behind-Master-Item/m-p/1790069#M14005</guid>
      <dc:creator>berndpodhradsky</dc:creator>
      <dc:date>2021-03-10T14:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK Get Visualization behind Master Item</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-Get-Visualization-behind-Master-Item/m-p/1790164#M14009</link>
      <description>&lt;P&gt;Assuming that you want to access the properties of the master object and treat them as bar chart properties, then you can convert the GenericObjectProperties to BarchartProperties using the "AbstractStructure.As" method like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using (var app = location.App(appId))
{
    var obj = app.GetGenericObject(objectId);
    var barchartProps = obj.Properties.As&amp;lt;BarchartProperties&amp;gt;();
    Console.WriteLine(barchartProps.BarGrouping.Grouping);    
}&lt;/LI-CODE&gt;&lt;P&gt;More on the topic of AbstractStructure can be found here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/February2021/Subsystems/NetSDKAPI/Content/Sense_NetSDKAPI/HowTos/Net-Sdk-How-To-Abstarct-Structure.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/February2021/Subsystems/NetSDKAPI/Content/Sense_NetSDKAPI/HowTos/Net-Sdk-How-To-Abstarct-Structure.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;An example focusing on the use of AbstractStructure in the .NET SDK can be found here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/AptkQlik/PublicExamples/blob/master/AbstractStructure/Program.cs" target="_blank"&gt;https://github.com/AptkQlik/PublicExamples/blob/master/AbstractStructure/Program.cs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 16:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-Get-Visualization-behind-Master-Item/m-p/1790164#M14009</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2021-03-10T16:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK Get Visualization behind Master Item</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-Get-Visualization-behind-Master-Item/m-p/1790171#M14010</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Thanks - I was aware of the approach you mentioned. But I infer from your answer that converting the &lt;EM&gt;MasterItem&lt;/EM&gt; to a &lt;EM&gt;Barchart&lt;/EM&gt; object is not possible, correct?&lt;/P&gt;&lt;P&gt;To explain why I ask this: if we have a function that takes a &lt;EM&gt;Barchart&lt;/EM&gt; object as parameter and does lots of things with that object and we want to extend this functionality to also support bar charts which have been added as master items, we have to rewrite the complete function, because we cannot get a &lt;EM&gt;Barchart&lt;/EM&gt; object from the master item. Am I right?&lt;/P&gt;&lt;P&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 16:50:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-Get-Visualization-behind-Master-Item/m-p/1790171#M14010</guid>
      <dc:creator>berndpodhradsky</dc:creator>
      <dc:date>2021-03-10T16:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK Get Visualization behind Master Item</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-Get-Visualization-behind-Master-Item/m-p/1790184#M14011</link>
      <description>&lt;P&gt;Yes, that is correct. A master object is not a barchart, but it can have properties describing a barchart. You could possibly use a linked object that extends the master object because &lt;EM&gt;that&lt;/EM&gt; would be a barchart. Like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var props = new GenericObjectProperties
{
    Info = new NxInfo {Type = "barchart"},
    ExtendsId = objectId
};
var barchart = (Barchart) app.CreateGenericSessionObject(props);
Console.WriteLine(barchart.Properties.BarGrouping.Grouping);
app.DestroyGenericSessionObject(barchart.Id);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the object will be read-only. If you want to modify it, then you have to go through the master item.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 12:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-Get-Visualization-behind-Master-Item/m-p/1790184#M14011</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2021-03-12T12:15:38Z</dc:date>
    </item>
  </channel>
</rss>

