<?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 Peek() problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228782#M80786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The general idea was:&lt;/P&gt;&lt;P&gt;When user click/select one cell in Table Box do some procedure.&lt;/P&gt;&lt;P&gt;1. I put into Edit Script following SQL:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;varStartUp&lt;/STRONG&gt;&lt;/EM&gt;:&lt;BR /&gt;SQL&lt;BR /&gt;SELECT 1 as TYP, 120 as Kod, 0.5 as DivKo1,'00' as SL,'10' as Jmf&lt;BR /&gt;UNION&lt;BR /&gt;SELECT 2 as TYP, 122 as Kod, 0.6 as DivKo1,'01' as SL,'11' as Jmf;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. On sheet as created Table Box with all fields of "varStartUp"&lt;/P&gt;&lt;P&gt;3. In Document Properties / Triggers was added Action for field event "TYP" (Run Macro -&amp;gt; "&lt;EM&gt;DO_Select&lt;/EM&gt;")&lt;/P&gt;&lt;P&gt;4. To Edit Module was added maro's script:&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Sub &lt;STRONG&gt;DO_Select&lt;/STRONG&gt;()&lt;BR /&gt;Let vFld = Peek('TYP',0,'varStartUp')&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When I try Debug script "DO_Select" in Edit Module I got Error message : "Expe&lt;STRONG&gt;cted statement&lt;/STRONG&gt; " for row Let vFld = Peek('TYP',0,'varStartUp')&lt;/P&gt;&lt;P&gt;Any combination with qoutes get the same error!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I need get all fields values (&lt;EM&gt;TYP, Kod, DinKo1, SL, Jmf&lt;/EM&gt;) for selected table row.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could you help me resolve this issue?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Apr 2010 06:31:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-30T06:31:39Z</dc:date>
    <item>
      <title>Peek() problem</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228782#M80786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The general idea was:&lt;/P&gt;&lt;P&gt;When user click/select one cell in Table Box do some procedure.&lt;/P&gt;&lt;P&gt;1. I put into Edit Script following SQL:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;varStartUp&lt;/STRONG&gt;&lt;/EM&gt;:&lt;BR /&gt;SQL&lt;BR /&gt;SELECT 1 as TYP, 120 as Kod, 0.5 as DivKo1,'00' as SL,'10' as Jmf&lt;BR /&gt;UNION&lt;BR /&gt;SELECT 2 as TYP, 122 as Kod, 0.6 as DivKo1,'01' as SL,'11' as Jmf;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. On sheet as created Table Box with all fields of "varStartUp"&lt;/P&gt;&lt;P&gt;3. In Document Properties / Triggers was added Action for field event "TYP" (Run Macro -&amp;gt; "&lt;EM&gt;DO_Select&lt;/EM&gt;")&lt;/P&gt;&lt;P&gt;4. To Edit Module was added maro's script:&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;Sub &lt;STRONG&gt;DO_Select&lt;/STRONG&gt;()&lt;BR /&gt;Let vFld = Peek('TYP',0,'varStartUp')&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When I try Debug script "DO_Select" in Edit Module I got Error message : "Expe&lt;STRONG&gt;cted statement&lt;/STRONG&gt; " for row Let vFld = Peek('TYP',0,'varStartUp')&lt;/P&gt;&lt;P&gt;Any combination with qoutes get the same error!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I need get all fields values (&lt;EM&gt;TYP, Kod, DinKo1, SL, Jmf&lt;/EM&gt;) for selected table row.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could you help me resolve this issue?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 06:31:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228782#M80786</guid>
      <dc:creator />
      <dc:date>2010-04-30T06:31:39Z</dc:date>
    </item>
    <item>
      <title>Peek() problem</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228783#M80787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I don't sure that you can to use a standard QV function (such as peek()) in Module script. In Module Script we can to use only standard API function (see in APIguide.qvw) and function VB/Java Script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 07:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228783#M80787</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2010-04-30T07:29:15Z</dc:date>
    </item>
    <item>
      <title>Peek() problem</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228784#M80788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmmm... Well...&lt;/P&gt;&lt;P&gt;And how I can get field values from Table Box after user made selection one of rows?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;? ??? ?????, ??? ?? ???????, ??????? ?????????? ?????? ?? ????????&lt;/P&gt;&lt;P&gt;??? ???? ???????? ??? ???????? ????? ?? ?????? Table Box , ??????? ?????? ????.&lt;/P&gt;&lt;P&gt;?.?. ?? ??????? ?? ?????-???? ?????? Table Box, ? ????????? ?????? ??????????????????? ?????????? ?????????? ?????????? ?? ????????? ??????Table Box?.&lt;/P&gt;&lt;P&gt;??? ??? ????????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 08:02:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228784#M80788</guid>
      <dc:creator />
      <dc:date>2010-04-30T08:02:38Z</dc:date>
    </item>
    <item>
      <title>Peek() problem</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228785#M80789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should to see in APIguide.qvw. and find some functions, which help you. For example, function GetSelectedValues:&lt;/P&gt;&lt;P&gt;sub LogFunktion&lt;BR /&gt; 'This routine logs selection to a text file&lt;BR /&gt;&lt;BR /&gt; set fso = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt; set mypath = ActiveDocument.GetProperties&lt;BR /&gt; directory = mypath.MyWorkingDirectory&lt;BR /&gt;&lt;BR /&gt; On Error Resume Next&lt;BR /&gt; ' See if file already exists.&lt;BR /&gt; Set filFile = fso.GetFile(directory &amp;amp; "log.txt")&lt;BR /&gt; ' If not, then create it.&lt;BR /&gt; If Err &amp;lt;&amp;gt; 0 Then&lt;BR /&gt; Set filFile = fso.CreateTextFile(directory &amp;amp; "log.txt")&lt;BR /&gt; End If&lt;BR /&gt;&lt;BR /&gt; Set txsStream = filFile.OpenAsTextStream(8) 'For Appending&lt;BR /&gt;&lt;BR /&gt; set doc = ActiveDocument&lt;BR /&gt; set mySelections = doc.fields("Field").GetSelectedValues&lt;BR /&gt;&lt;BR /&gt; for i = 0 to mySelections.Count - 1&lt;BR /&gt; txsStream.WriteLine Now &amp;amp; " " &amp;amp; mySelections.Item(i).text&lt;BR /&gt; next&lt;BR /&gt; txsStream.WriteBlankLines 1&lt;BR /&gt; txsStream.Close&lt;BR /&gt;&lt;BR /&gt; end sub&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;??, ? ??????? &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt;.&lt;/P&gt;&lt;P&gt;? ??? ????? ???? ???? ????????? ??? ?????????? ?? ?????? ?????, ???????? ? TableBox, ?????????? ???? ???, ?? ?????????? ???????? ????????? ????? ??? ?????? ??????? ????, ? ?? ????????? ????? ?????????? ??????? GetPossibleValues (?????? ????????????? ??????? ? ????????????)...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 08:16:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228785#M80789</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2010-04-30T08:16:54Z</dc:date>
    </item>
    <item>
      <title>Peek() problem</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228786#M80790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! I'll try and feedback.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 08:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228786#M80790</guid>
      <dc:creator />
      <dc:date>2010-04-30T08:31:17Z</dc:date>
    </item>
    <item>
      <title>Peek() problem</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228787#M80791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have additional question concerning my main question above.&lt;/P&gt;&lt;P&gt;I have found one interesting function: GetSheetObject()&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;&lt;STRONG&gt;set Obj = ActiveDocument.GetSheetObject("&lt;EM&gt;tbStartUpVar&lt;/EM&gt;")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Could I reach the selected item in Table Box if I will use "&lt;STRONG&gt;&lt;EM&gt;Obj&lt;/EM&gt;&lt;/STRONG&gt;"?&lt;/P&gt;&lt;P&gt;Please explain me this approach.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;? ????? ??????? ????? ?????? ?????? ?? ??????????? ??????????? ???????? ? Table Box - GetSheetObject()&lt;/P&gt;&lt;P&gt;??? ????? ??? ??? ????? ????? ????? ???????? ?? ????? ?????? ? ???????? ???? ? ????????? ??????.&lt;/P&gt;&lt;P&gt;???????????? ? ?? ???? ??? ?????????? ?? ????????? ?????/?????? ????? ?????????? "&lt;STRONG&gt;&lt;EM&gt;Obj&lt;/EM&gt;&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;?????????&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;? ??? ???? ??? ????? ????? ?????????? ?????? ?? ???? ???? ???????? ???? GetSheetObject ? ?.?.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 09:21:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228787#M80791</guid>
      <dc:creator />
      <dc:date>2010-04-30T09:21:02Z</dc:date>
    </item>
    <item>
      <title>Peek() problem</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228788#M80792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't sure that your approach is simplier, but if you want you can to use it.&lt;/P&gt;&lt;P&gt;Try to find some functions for class TableBox (see in APIguide.qvw), for example getCell, getCells etc. May be you can to find useful functions for your solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;?? ?????? ??? ????? ????????? ????? ??? ??????, ???? ???? ???? ????? ???????? ????? ????? ??????????? ?????????? (?.?. ???-?? ???? ?????????????? ???????, ? ?? ?????? ?????????? ????????? ????? ?????, ????????? ? ?????????? TableBox), ?? ???????? ??? ????? ??????? ?????? ??? ??? ?? ???????????. ?????? ??????? ?????? TableBox, ITablebox*.&lt;/P&gt;&lt;P&gt;??? ???? ?? API ????????? ? ??????????? ?????. ??????? ??? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ?? ??? ? ???????? ??? ????????? ??????? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 09:38:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228788#M80792</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2010-04-30T09:38:26Z</dc:date>
    </item>
    <item>
      <title>Peek() problem</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228789#M80793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simplicity, my friends, will save the world!. Can you step back and explain in simple terms what exactly you are trying to accomplish? I'm sure there is a better way.&lt;/P&gt;&lt;P&gt;If I understand you correctly, you need to look at everything related to the Class IRCCell. Here is an example from the APIGuide:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set TableBox = ActiveDocument.GetSheetObject( "TB01" )&lt;BR /&gt;set cell = TableBox.GetCell(0,0)&lt;BR /&gt;set x = cell.Text&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;Prostota spaset mir!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 11:27:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-problem/m-p/228789#M80793</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2010-04-30T11:27:01Z</dc:date>
    </item>
  </channel>
</rss>

