<?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: NxCell Number/Date Format String in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658838#M12025</link>
    <description>Hi!&lt;BR /&gt;&lt;BR /&gt;That‘s what I thought. Well, thanks for your time and help!&lt;BR /&gt;&lt;BR /&gt;Bernd&lt;BR /&gt;</description>
    <pubDate>Wed, 18 Dec 2019 08:26:20 GMT</pubDate>
    <dc:creator>berndpodhradsky</dc:creator>
    <dc:date>2019-12-18T08:26:20Z</dc:date>
    <item>
      <title>NxCell Number/Date Format String</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658281#M12010</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;When reading a hypercube through a pager using the .NET SDK, I successfully get arrays of NxCells that contain Num and Text properties (basically using the code given here:&amp;nbsp;&lt;A href="https://github.com/kolsrud/qlik-dot-net-sdk-hypercube-usage" target="_blank"&gt;https://github.com/kolsrud/qlik-dot-net-sdk-hypercube-usage&lt;/A&gt;). However, what I couldn't find out is: how to get the custom number format that has been applied to a value.&lt;/P&gt;&lt;P&gt;In scenarios where there's a "global" number format set in the measure definition, it's easy; the measure definition then contains all the information needed.&lt;/P&gt;&lt;P&gt;But what if the measure is set to "AutoFormat" and the measure expression contains something similiar to "if(&amp;lt;condition&amp;gt;, num(&amp;lt;val1&amp;gt;, &amp;lt;format1&amp;gt;), num(&amp;lt;val2&amp;gt;, &amp;lt;format2&amp;gt;))"? In such a case, there is not just one format string per measure and each NxCell could (potentially) have its own format string.&lt;/P&gt;&lt;P&gt;Is there any way to get access to the effective format string applied to a given NxCell?&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 01:00:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658281#M12010</guid>
      <dc:creator>berndpodhradsky</dc:creator>
      <dc:date>2019-12-17T01:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: NxCell Number/Date Format String</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658352#M12013</link>
      <description>&lt;P&gt;I'm pretty sure the answer to your question is "no". In your case the format is baked into the expression it self, and as far as I know there is no way to extract such metadata from an evaluated expression. But you could add another measure to the hypercube that only contains the format. That way you could correlate the resulting number with the format by associating the two columns of the resulting table. So one measure would be:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;if(&amp;lt;condition&amp;gt;, num(&amp;lt;val1&amp;gt;, &amp;lt;format1&amp;gt;), num(&amp;lt;val2&amp;gt;, &amp;lt;format2&amp;gt;))&lt;/LI-CODE&gt;
&lt;P&gt;and the other measure would simply be:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;if(&amp;lt;condition&amp;gt;, &amp;lt;format1&amp;gt;, &amp;lt;format2&amp;gt;)&lt;/LI-CODE&gt;
&lt;P&gt;Each row of the resulting table would then contain both the computed value and the format used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 08:23:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658352#M12013</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2019-12-17T08:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: NxCell Number/Date Format String</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658483#M12018</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Thanks for your answer. Unfortunately that's not a solution that would work in our context, because it would require massive rework of many tables and also leads to additional columns visible to the user.&lt;/P&gt;&lt;P&gt;So essentially what you're saying is that there's no reliable, bullet-proof way of reading NxCells and get their correct format, because you never know if an expression has explicit format strings set and that information is not available to API consumers? Are there any plans to change that?&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 12:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658483#M12018</guid>
      <dc:creator>berndpodhradsky</dc:creator>
      <dc:date>2019-12-17T12:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: NxCell Number/Date Format String</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658827#M12022</link>
      <description>&lt;P&gt;Hmm... What's the context in which this is going to be used? Are you looking for a generic solution to automatically get the format for any measure? In that case I agree that there is no good solution.&lt;/P&gt;
&lt;P&gt;But my suggestion does not really require you to change the app at all. As you are interacting through the API you could simply create a session object with a copy of the hypercube and add the extra measure there. However, that suggestion is based on my original assumption that you know in advance exactly which measure you want to retrieve the format from and the condition for choosing that formatting. And if that assumption is false, then I'll keep quiet &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 08:06:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658827#M12022</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2019-12-18T08:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: NxCell Number/Date Format String</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658830#M12023</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;I could add the additional measure through the API, that‘s correct. But with which expression? I would have to dynamically parse the expression of the actual measure and then reconstruct it for the additional measure. If an app designer changes the original measure, my format measure would otherwise be incorrect.&lt;BR /&gt;&lt;BR /&gt;Basically it should be a general approach to circumnavigate problems with the current Excel export, where values are being exported to Excel as text rather than a number + a format string. But what if you want to make further calculations in Excel? Not possible if the values are texts...&lt;BR /&gt;&lt;BR /&gt;Kind Regards,&lt;BR /&gt;Bernd&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Dec 2019 08:15:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658830#M12023</guid>
      <dc:creator>berndpodhradsky</dc:creator>
      <dc:date>2019-12-18T08:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: NxCell Number/Date Format String</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658834#M12024</link>
      <description>&lt;P&gt;I hear you. That's the "generic solution" solution I mentioned in my previous comment. There is no solution for that (as far as I know at least).&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 08:23:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658834#M12024</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2019-12-18T08:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: NxCell Number/Date Format String</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658838#M12025</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;That‘s what I thought. Well, thanks for your time and help!&lt;BR /&gt;&lt;BR /&gt;Bernd&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Dec 2019 08:26:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NxCell-Number-Date-Format-String/m-p/1658838#M12025</guid>
      <dc:creator>berndpodhradsky</dc:creator>
      <dc:date>2019-12-18T08:26:20Z</dc:date>
    </item>
  </channel>
</rss>

