<?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>Question Re: Sap Analytics Cloud insert Dynamic Comments in a client calculation Dimension Comment in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sap-analytics-cloud-insert-dynamic-comments-in-a-client-calculation/qaa-p/12745932#M4784002</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;filomena_sap_1997&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;filomena_sap_1997&lt;/SPAN&gt;May be you should try to console.log(val) and console.log(seltab2[j]) and see what kind of values you are getting in those 2 variables. It will help you to understand your error better.&lt;/P&gt;&lt;P&gt;Br.&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2023 16:23:27 GMT</pubDate>
    <dc:creator>N1kh1l</dc:creator>
    <dc:date>2023-12-07T16:23:27Z</dc:date>
    <item>
      <title>Sap Analytics Cloud insert Dynamic Comments in a client calculation Dimension Comment</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-analytics-cloud-insert-dynamic-comments-in-a-client-calculation/qaq-p/12745931</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
  &lt;P&gt;what I am trying to achieve is to insert some values in a Dimension Comment Column dinamically based on a condition, &lt;/P&gt;
  &lt;P&gt;I want to insert into the "Dimension Comment" Column of the right table a comment which contains the value of the VAT measure of the Left table, for the same id between Legal Entity and Intercompany (eg. Intercompany BD01 should contain 58,472,55 in the Dimension Comment column)&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2231573-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I have written this code onInitialization event: &lt;/P&gt;
  &lt;P&gt;var selections = Table_8.getDataSource().getDataSelections();&lt;/P&gt;
  &lt;P&gt;var seltab1=Table_8.getDataSource().getResultSet(); //this contains the resultset of the left table&lt;/P&gt;
  &lt;P&gt;var seltab2=Table_9.getDataSource().getResultSet(); //this contains the resultset of the right table&lt;/P&gt;
  &lt;P&gt;for ( var i=0;i&amp;lt;seltab1.length;i++) //this loops on the left table&lt;/P&gt;
  &lt;P&gt;{ &lt;/P&gt;
  &lt;P&gt; for(var j=0;j&amp;lt;seltab2.length;j++){ //this loops on the right table&lt;/P&gt;
  &lt;P&gt; if(seltab1[i]["Legal_Entity"].id===seltab2[j]["Intercompany"].id){ //if the ids are equal&lt;/P&gt;
  &lt;P&gt; if(seltab1[i][Alias.MeasureDimension].description==="VAT"){ //if it's the measure VAT&lt;/P&gt;
  &lt;P&gt; var dataCell1=Table_8.getDataSource().getData(selections[i]); //get that value&lt;/P&gt;
  &lt;P&gt; var val=dataCell1.rawValue; &lt;/P&gt;
  &lt;P&gt; Table_9.getComments().setDimensionComment(seltab2[j],val); &lt;/P&gt;
  &lt;P&gt; //set the comment with the taken value on the current selection&lt;/P&gt;
  &lt;P&gt; }&lt;/P&gt;
  &lt;P&gt; }&lt;/P&gt;
  &lt;P&gt; }&lt;/P&gt;
  &lt;P&gt;}&lt;/P&gt;
  &lt;P&gt;But it doesn't work, the applications goes in script error... &lt;/P&gt;
  &lt;P&gt;the value is taken correctly, the code goes well til the instruction "var val=dataCell1.rawValue;" &lt;/P&gt;
  &lt;P&gt; There's something wrong in the way I'm passing the current selection...&lt;/P&gt;
  &lt;P&gt;Can anyone help me correct my code? &lt;/P&gt;
  &lt;P&gt;Many thanks,&lt;/P&gt;
  &lt;P&gt;Best Regards.&lt;/P&gt;
  &lt;P&gt;Filomena.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 14:48:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-analytics-cloud-insert-dynamic-comments-in-a-client-calculation/qaq-p/12745931</guid>
      <dc:creator>filomena_melardo_1997</dc:creator>
      <dc:date>2023-12-07T14:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sap Analytics Cloud insert Dynamic Comments in a client calculation Dimension Comment</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-analytics-cloud-insert-dynamic-comments-in-a-client-calculation/qaa-p/12745932#M4784002</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;filomena_sap_1997&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;filomena_sap_1997&lt;/SPAN&gt;May be you should try to console.log(val) and console.log(seltab2[j]) and see what kind of values you are getting in those 2 variables. It will help you to understand your error better.&lt;/P&gt;&lt;P&gt;Br.&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 16:23:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-analytics-cloud-insert-dynamic-comments-in-a-client-calculation/qaa-p/12745932#M4784002</guid>
      <dc:creator>N1kh1l</dc:creator>
      <dc:date>2023-12-07T16:23:27Z</dc:date>
    </item>
  </channel>
</rss>

