<?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: Using variable value in replace function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402729#M485643</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;I'm almost on the right track, but it seems to be giving me 2 lines. One with the replace and one without.&lt;/P&gt;&lt;P&gt;I just need to return the replaced record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached the .qvw , to show what it is returning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Apr 2013 12:33:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-28T12:33:26Z</dc:date>
    <item>
      <title>Using variable value in replace function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402725#M485639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to strip out certain userid's from a comment, using the replace function.&lt;/P&gt;&lt;P&gt;-attached is the sample .qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all I create a table of possible userid's that could be found in a comment.&lt;/P&gt;&lt;P&gt;Then I create a variable called vUser, using these values in this table of UserID's.&lt;/P&gt;&lt;P&gt;Finally I want to be able to use this variable - vUser, in the replace function. replace(comment, $(vUser), '*******').&lt;/P&gt;&lt;P&gt;The problem is that I want to be able to look through the list of UserID's and if it is found in the comment, then replace it with '*******'&lt;/P&gt;&lt;P&gt;Like a find and replace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could I go about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas would be appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 03:57:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402725#M485639</guid>
      <dc:creator />
      <dc:date>2013-04-26T03:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable value in replace function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402726#M485640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;create variable, vUser &lt;/P&gt;&lt;P&gt;=Concat(comment,';') &lt;/P&gt;&lt;P&gt;then use&lt;/P&gt;&lt;P&gt;replace(comment, $(vUser), '*******').&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 05:52:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402726#M485640</guid>
      <dc:creator />
      <dc:date>2013-04-26T05:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable value in replace function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402727#M485641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishwaranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is with the SET vUser = PEEK('USERID', 0, 'userids');&lt;/P&gt;&lt;P&gt;It only returns one row, but I need it to look at all records in the list of UserIDs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Apr 2013 05:53:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402727#M485641</guid>
      <dc:creator />
      <dc:date>2013-04-27T05:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable value in replace function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402728#M485642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii beanz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of &lt;STRONG&gt;set vuser&lt;/STRONG&gt; use the &lt;STRONG&gt;Let vUser &lt;/STRONG&gt;and that to in the For loop then you will able to get the all the userIds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for Example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//**********************************************************//&lt;/P&gt;&lt;P&gt;userid&lt;/P&gt;&lt;P&gt;load * inline [&lt;/P&gt;&lt;P&gt;USERID&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;C&lt;BR /&gt;D&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vRecord = &lt;SPAN class="Bold"&gt;NoOfRows&lt;/SPAN&gt;('userid');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = 0 to (vRecord) -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;LET vUser = PEEK('USERID', 0, 'userids');&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;//**********************************************************//&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above script will give you the all the userids pass into &lt;STRONG&gt;vUser&lt;/STRONG&gt; Variable.&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;-Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Apr 2013 15:44:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402728#M485642</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2013-04-27T15:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable value in replace function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402729#M485643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;I'm almost on the right track, but it seems to be giving me 2 lines. One with the replace and one without.&lt;/P&gt;&lt;P&gt;I just need to return the replaced record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached the .qvw , to show what it is returning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Apr 2013 12:33:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-value-in-replace-function/m-p/402729#M485643</guid>
      <dc:creator />
      <dc:date>2013-04-28T12:33:26Z</dc:date>
    </item>
  </channel>
</rss>

