<?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: How to fetch table cell data from analytic application using script and display as text in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569251#M4712980</link>
    <description>&lt;P&gt;Thank you  &lt;SPAN class="mention-scrubbed"&gt;bob.meincke&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Can you tell me extactly how this can be done?&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 13:19:06 GMT</pubDate>
    <dc:creator>rijin_baby61</dc:creator>
    <dc:date>2022-10-13T13:19:06Z</dc:date>
    <item>
      <title>How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaq-p/12569243</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I have the following table in sac analytic application with just 1 cell, all the filter applied are shown in the screenshot.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2103773-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I am trying to fetch the data from the data cell to a text box using script.&lt;/P&gt;
  &lt;P&gt;I tried but doesn't work&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;var value = Table_1.getDataSource().getData({"@MeasureDimension": "[% Prev Infl]"}).formattedValue;&lt;BR /&gt;Text_2.applyText(value);&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Can you help me to correct the script to access the cell data&lt;/P&gt;
  &lt;P&gt;Also if there is a way to access cell value using row column index in getDataSource().getData() kindly let me know&lt;/P&gt;
  &lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 09:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaq-p/12569243</guid>
      <dc:creator>rijin_baby61</dc:creator>
      <dc:date>2022-10-13T09:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569244#M4712973</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I've just tested this syntax using the SAP sample data &amp;amp; it works&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Text_1.applyText(Table_1.getDataSource().getData({"@MeasureDimension":"[Account_BestRunJ_sold].[parentId].&amp;amp;[Gross_Margin]" }).formattedValue);&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Table_1 : containing just the gross margin measure&lt;BR /&gt;Textbox = Text_1&lt;/P&gt;&lt;P&gt;Put the above code in a button to run it.&lt;/P&gt;&lt;P&gt;Are you seeing any errors? do you see any output of your code in the Chrome Console?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 10:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569244#M4712973</guid>
      <dc:creator>JBARLOW</dc:creator>
      <dc:date>2022-10-13T10:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569245#M4712974</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;jbarlowjb&lt;/SPAN&gt;, thank you for your help&lt;/P&gt;&lt;P&gt;I tried the following code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Text_2.applyText(Table_1.getDataSource().getData({"@MeasureDimension":"[% Prev Infl]" }).formattedValue);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I think I am doing wrong in mentioning the measure dimension. I have a single dimension.&lt;/P&gt;&lt;P&gt;what should be my [Account_BestRunJ_sold].[parentId]?&lt;/P&gt;&lt;P&gt;Error on console&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Script execution failed for "Text_2.onClick" event&amp;lt;br&amp;gt;  This error appears to have occurred due to a problem in the script that you tried to run. Check the script if possible.&amp;lt;br&amp;gt;Cannot read properties of undefined (reading 'formattedValue') &amp;lt;br&amp;gt; TypeError: Cannot read properties of undefined (reading 'formattedValue')&amp;lt;br&amp;gt;    at Proxy.eval (Text_2.onClick.js:6:5) &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Oct 2022 10:34:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569245#M4712974</guid>
      <dc:creator>rijin_baby61</dc:creator>
      <dc:date>2022-10-13T10:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569246#M4712975</link>
      <description>&lt;P&gt;what's actually in your table?&lt;/P&gt;&lt;P&gt;Is it a calculated measure dimension?  or a numeric dimension?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 10:48:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569246#M4712975</guid>
      <dc:creator>JBARLOW</dc:creator>
      <dc:date>2022-10-13T10:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569247#M4712976</link>
      <description>&lt;P&gt;the value displayed is a calculated measure&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 10:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569247#M4712976</guid>
      <dc:creator>rijin_baby61</dc:creator>
      <dc:date>2022-10-13T10:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569248#M4712977</link>
      <description>&lt;P&gt;Possibly not quite right,&lt;/P&gt;&lt;P&gt;But does something like this work?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;var DIMKEY = Table_1.getDimensionsOnRows()[0];
var selections = Table_1.getDataSource().getDataSelections();

var member = Table_1.getDataSource().getResultMember(DIMKEY,selections[0]);
 
Text_1.applyText(member.id);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Oct 2022 10:59:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569248#M4712977</guid>
      <dc:creator>JBARLOW</dc:creator>
      <dc:date>2022-10-13T10:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569249#M4712978</link>
      <description>&lt;P&gt;Try to verify whether your selection is correct. You can do this by logging the output of Table_1.getSelections() from the on select handler of the table.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 12:22:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569249#M4712978</guid>
      <dc:creator>Bob0001</dc:creator>
      <dc:date>2022-10-13T12:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569250#M4712979</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;jbarlowjb&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;I used the code that you shared, error for me&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Cannot read properties of undefined (reading 'id') &lt;BR /&gt; TypeError: Cannot read properties of undefined (reading 'id')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I also tried in a new table with a numeric dimension. still nor working&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 13:16:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569250#M4712979</guid>
      <dc:creator>rijin_baby61</dc:creator>
      <dc:date>2022-10-13T13:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569251#M4712980</link>
      <description>&lt;P&gt;Thank you  &lt;SPAN class="mention-scrubbed"&gt;bob.meincke&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Can you tell me extactly how this can be done?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 13:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569251#M4712980</guid>
      <dc:creator>rijin_baby61</dc:creator>
      <dc:date>2022-10-13T13:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569252#M4712981</link>
      <description>&lt;P&gt;use console log&lt;/P&gt;&lt;P&gt;console.log(Table_1.getDataSource().getDataSelections());&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 13:41:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569252#M4712981</guid>
      <dc:creator>JBARLOW</dc:creator>
      <dc:date>2022-10-13T13:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569253#M4712982</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;rijin_baby&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;See: &lt;A href="https://blogs.sap.com/2020/02/10/debugging-sac-analytic-designer-applications/" target="test_blank"&gt;https://blogs.sap.com/2020/02/10/debugging-sac-analytic-designer-applications/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;on the use of console.log()&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 13:53:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569253#M4712982</guid>
      <dc:creator>Marc_Kuipers</dc:creator>
      <dc:date>2022-10-13T13:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569254#M4712983</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;jbarlowjb&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Thank you for the help. I fixed it.&lt;/P&gt;&lt;P&gt;the issue was for a calculated measure we don't use the name but the technical code.&lt;/P&gt;&lt;P&gt;In my case it was something like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Table_1.getDataSource().getData({"@MeasureDimension":"65184617-4409-4841-9644-180224944563"}).formattedValue;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Using console.log it is easy. Thank you for all the suggestions. It really helped to learn more&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569254#M4712983</guid>
      <dc:creator>rijin_baby61</dc:creator>
      <dc:date>2022-10-13T15:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to fetch table cell data from analytic application using script and display as text</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569255#M4712984</link>
      <description>&lt;P&gt;Thank You. &lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-fetch-table-cell-data-from-analytic-application-using-script-and/qaa-p/12569255#M4712984</guid>
      <dc:creator>rijin_baby61</dc:creator>
      <dc:date>2022-10-13T15:09:39Z</dc:date>
    </item>
  </channel>
</rss>

