<?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: Grant in Folder by VBScript in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522649#M600320</link>
    <description>&lt;P&gt;I mean, in edit module (CTRL+M) there's a button called "Test" that you can execute your function, and it runs correct for me. The grant was granted succefull in my example qvw.&lt;/P&gt;&lt;P&gt;In script (CTRL+E) I called that function inside the FOR statement in the line 17, but the function doens't work and the grant wasn't granted.&lt;/P&gt;&lt;P&gt;- José Khouri&lt;/P&gt;</description>
    <pubDate>Wed, 19 Dec 2018 15:51:46 GMT</pubDate>
    <dc:creator>josekhouri</dc:creator>
    <dc:date>2018-12-19T15:51:46Z</dc:date>
    <item>
      <title>Grant in Folder by VBScript</title>
      <link>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522543#M600316</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm looking for a way to give grant to some users in a specific folder by VBSCript, using module and the script to pass the parameters, but it doesn't work.&lt;/P&gt;&lt;P&gt;I was searching on the community, but I didn't found nothing specific about grant access in folder by VBScript or a similar question. Can anyone help me with this answer?&lt;/P&gt;&lt;P&gt;I'm upload an example help to clarify the idea.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;José Khouri&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:42:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522543#M600316</guid>
      <dc:creator>josekhouri</dc:creator>
      <dc:date>2024-11-16T21:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Grant in Folder by VBScript</title>
      <link>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522576#M600317</link>
      <description>&lt;P&gt;Maybe this is helpful: &lt;A href="https://stackoverflow.com/questions/15212018/set-permission-with-vbscript" target="_blank"&gt;set-permission-with-vbscript&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 12:49:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522576#M600317</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-12-19T12:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Grant in Folder by VBScript</title>
      <link>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522585#M600318</link>
      <description>&lt;P&gt;Hello Marcus,&lt;/P&gt;&lt;P&gt;Thanks for the tip, but my module is functional. It works separate, if I test it on edit module, but it doesn't work when I call it in QV script.&lt;/P&gt;&lt;P&gt;I noticed the function apparently don't work in the loop FOR in script. Is it anything I wrote wrong in code?&lt;/P&gt;&lt;P&gt;- José Khouri&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 13:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522585#M600318</guid>
      <dc:creator>josekhouri</dc:creator>
      <dc:date>2018-12-19T13:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Grant in Folder by VBScript</title>
      <link>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522610#M600319</link>
      <description>&lt;P&gt;What do you mean with:&lt;/P&gt;&lt;P&gt;...&amp;nbsp; It works separate, if I test it on edit module, but it doesn't work when I call it in QV script. ...&lt;/P&gt;&lt;P&gt;Where and how is this call executed. For example triggered by the QMC won't work and also the user which runs this macro must have the rights to change such access-rights for this folder.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 14:07:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522610#M600319</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-12-19T14:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Grant in Folder by VBScript</title>
      <link>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522649#M600320</link>
      <description>&lt;P&gt;I mean, in edit module (CTRL+M) there's a button called "Test" that you can execute your function, and it runs correct for me. The grant was granted succefull in my example qvw.&lt;/P&gt;&lt;P&gt;In script (CTRL+E) I called that function inside the FOR statement in the line 17, but the function doens't work and the grant wasn't granted.&lt;/P&gt;&lt;P&gt;- José Khouri&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 15:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522649#M600320</guid>
      <dc:creator>josekhouri</dc:creator>
      <dc:date>2018-12-19T15:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Grant in Folder by VBScript</title>
      <link>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522673#M600321</link>
      <description>&lt;P&gt;If you call a macro from the script, you can not use references to any Qlikview object like Application, ActiveDocument and so on.&lt;/P&gt;&lt;P&gt;You can do it in the following way:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;IF(NoOfRows('UsersAccess')&amp;gt;0) THEN&lt;/P&gt;&lt;P&gt;LET nUsers = NoOfRows('UsersAccess');&lt;BR /&gt;LET docPath=DocumentPath();&lt;BR /&gt;TRACE '$(docPath)';&lt;/P&gt;&lt;P&gt;FOR i = 0 to nUsers - 1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;LET UsersAccess = Peek('User', i, 'UsersAccess');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;TRACE '$(UsersAccess)';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;LET ExecuteGrant = GrantScript('$(docPath)','$(UsersAccess)');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;TRACE '$(ExecuteGrant)';&lt;BR /&gt;NEXT&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Macro:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Function GrantScript(TmpPath,strDomainUser)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; LastBackSlash = InStrRev(TmpPath, "\")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; strPath = Left(TmpPath,(LastBackSlash - 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Set WshShell = CreateObject("Wscript.Shell")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; WshShell.Run "Icacls " &amp;amp; strPath &amp;amp; " /grant " &amp;amp; strDomainUser &amp;amp; ":(OI)(CI)RX"&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; GrantScript=strPath &amp;amp; " - " &amp;amp; strDomainUser&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;- Christian&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 16:38:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522673#M600321</guid>
      <dc:creator>cwolf</dc:creator>
      <dc:date>2018-12-19T16:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Grant in Folder by VBScript</title>
      <link>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522689#M600322</link>
      <description>&lt;P&gt;Great! It worked!&lt;/P&gt;&lt;P&gt;I just needed to put one more condition in the docPath statement to get the path without the qvw app name.&lt;/P&gt;&lt;P&gt;Like this... LET docPath = Left(DocumentPath(), Index(DocumentPath(),'\',-1));&lt;/P&gt;&lt;P&gt;Thanks Christian!&lt;/P&gt;&lt;P&gt;- José Khouri&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 17:44:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grant-in-Folder-by-VBScript/m-p/1522689#M600322</guid>
      <dc:creator>josekhouri</dc:creator>
      <dc:date>2018-12-19T17:44:40Z</dc:date>
    </item>
  </channel>
</rss>

