<?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 Set Expression using UserID in Management &amp; Governance</title>
    <link>https://community.qlik.com/t5/Management-Governance/Set-Expression-using-UserID/m-p/1903829#M21504</link>
    <description>&lt;P&gt;I am trying to extract a single value from my table based on the active user of the app. The value I am pulling out is an access code that will limit which sheets in the application the user can see.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am currently using&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;=Text(SubField(OsUser(),'=',-1))&lt;/P&gt;
&lt;P&gt;to get the active user of the sheet. This is set into the variable 'ActiveUser' in the Data Load Editor.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data I have imported has this UserID, called 'QSIdPSubject' (I didn't name it) and an [AccessLevel] which is a simple number.&lt;/P&gt;
&lt;P&gt;I am trying to use&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;=only(&amp;nbsp; {1&amp;lt; [QSIdPSubject] ={'$(=$(ActiveUser))'}&amp;gt;} [AccessLevel])&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as a variable expression to get the Access Level integer. The Access Level will then be used in the show conditions of each sheet.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting no results from the set expression even though I have manually confirmed the two IDs are identical and Qlik is showing no errors in the formula.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Mar 2022 00:24:00 GMT</pubDate>
    <dc:creator>J_Post</dc:creator>
    <dc:date>2022-03-11T00:24:00Z</dc:date>
    <item>
      <title>Set Expression using UserID</title>
      <link>https://community.qlik.com/t5/Management-Governance/Set-Expression-using-UserID/m-p/1903829#M21504</link>
      <description>&lt;P&gt;I am trying to extract a single value from my table based on the active user of the app. The value I am pulling out is an access code that will limit which sheets in the application the user can see.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am currently using&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;=Text(SubField(OsUser(),'=',-1))&lt;/P&gt;
&lt;P&gt;to get the active user of the sheet. This is set into the variable 'ActiveUser' in the Data Load Editor.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data I have imported has this UserID, called 'QSIdPSubject' (I didn't name it) and an [AccessLevel] which is a simple number.&lt;/P&gt;
&lt;P&gt;I am trying to use&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;=only(&amp;nbsp; {1&amp;lt; [QSIdPSubject] ={'$(=$(ActiveUser))'}&amp;gt;} [AccessLevel])&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as a variable expression to get the Access Level integer. The Access Level will then be used in the show conditions of each sheet.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting no results from the set expression even though I have manually confirmed the two IDs are identical and Qlik is showing no errors in the formula.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 00:24:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Set-Expression-using-UserID/m-p/1903829#M21504</guid>
      <dc:creator>J_Post</dc:creator>
      <dc:date>2022-03-11T00:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression using UserID</title>
      <link>https://community.qlik.com/t5/Management-Governance/Set-Expression-using-UserID/m-p/1903839#M21505</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/168532"&gt;@J_Post&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;First thing that I see is that you're using single quotes around the dollar expansion. This is for a string so if you want to resolve the dollar expansion you have to use double quotes.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=only(&amp;nbsp; {1&amp;lt; [QSIdPSubject] ={&lt;STRONG&gt;"&lt;/STRONG&gt;$(=$(ActiveUser))&lt;STRONG&gt;"&lt;/STRONG&gt;}&amp;gt;} [AccessLevel])&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Give that a try&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Anthony&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 01:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Set-Expression-using-UserID/m-p/1903839#M21505</guid>
      <dc:creator>anthonyj</dc:creator>
      <dc:date>2022-03-11T01:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression using UserID</title>
      <link>https://community.qlik.com/t5/Management-Governance/Set-Expression-using-UserID/m-p/1904073#M21511</link>
      <description>&lt;P&gt;Hi Anthony,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This got me a little closer. Instead of showing null I get 0 out of the expression which is definitely a step in the right direction.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could there be an issue with empty space or format? There is visually no difference in the QSIdPSubject and the ActiveUser, but I am still not getting a value returned.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 12:56:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Set-Expression-using-UserID/m-p/1904073#M21511</guid>
      <dc:creator>J_Post</dc:creator>
      <dc:date>2022-03-11T12:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression using UserID</title>
      <link>https://community.qlik.com/t5/Management-Governance/Set-Expression-using-UserID/m-p/1904120#M21512</link>
      <description>&lt;P&gt;For anyone else looking at this for a similar problem. I found the solution. I was overcomplicating the set expression. It only needs to be.&lt;/P&gt;
&lt;P&gt;=only({1&amp;lt;QSIdPSubject={"$(vActiveUser)"}&amp;gt;} AccessLevel)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just was using to many parentheses and such. Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 14:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Set-Expression-using-UserID/m-p/1904120#M21512</guid>
      <dc:creator>J_Post</dc:creator>
      <dc:date>2022-03-11T14:37:18Z</dc:date>
    </item>
  </channel>
</rss>

