<?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 NTNAME to display data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/NTNAME-to-display-data/m-p/1375001#M815899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have following script.&lt;/P&gt;&lt;P&gt;I am using NTNAME for access. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step1:&lt;/P&gt;&lt;P&gt;In ConfigUsers table I am populating the Country which is assigned to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConfigUsers table data&lt;/P&gt;&lt;P&gt;NTNAME,Country&lt;/P&gt;&lt;P&gt;User1,US&lt;/P&gt;&lt;P&gt;User2,UK&lt;/P&gt;&lt;P&gt;User1,Spain&lt;/P&gt;&lt;P&gt;User3,France&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step2 : I am loading Orders table in Orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step3: Creating Mapping Load Table from existing ConfigUsers. Here data is correctly populated for e.g. for User1 2 rows US and Spain are populated in Config2 table. I have checked this by creating tablebox for Config2 table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step4: Creating Sale table. Here I am trying to display all records from Orders table(created in Step2). But if ShipCountry is found in Config2 table(created in Step3) then display Country else display '****'.&lt;/P&gt;&lt;P&gt;Similarly if ShipCountry is found in Config2 table(created in Step3) then display CustomerId and so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When User1 access, there are two rows (US and Spain) in Config2 table (I have checked this by creating tablebox for Config2 table), those Shipcountry value is displayed correctly. &lt;/P&gt;&lt;P&gt;But those ShipCountry which is not assigned to User1, I want to display '****', but it shows respective Country values instead of display '****'.&lt;/P&gt;&lt;P&gt;Similarly I want to display CustomerID, EmployeeID value only if the ShipContry is found in Config2 table else display&amp;nbsp; '****'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar thing should happen if User2,User3 access the .qvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried VLOOKUP, but it also doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO ConnectionString&lt;/P&gt;&lt;P&gt;//Step1&lt;/P&gt;&lt;P&gt;ConfigUsers:&lt;/P&gt;&lt;P&gt;SQL SELECT NTNAME,[Country]&lt;/P&gt;&lt;P&gt;FROM tbl_Entitlement;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Step2&lt;/P&gt;&lt;P&gt;Orders:&lt;/P&gt;&lt;P&gt;SQL SELECT OID,[OrderID],[CustomerID],[EmployeeID],[OrderDate],[RequiredDate],[ShippedDate],[ShipVia],[Freight],[ShipName],&lt;/P&gt;&lt;P&gt;[ShipAddress],[ShipCity],[ShipRegion],[ShipPostalCode],[ShipCountry]&lt;/P&gt;&lt;P&gt;FROM Orders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Step3&lt;/P&gt;&lt;P&gt;Config2:&lt;/P&gt;&lt;P&gt;mapping load Country AS ShipCountry,Country Resident ConfigUsers;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Step4&lt;/P&gt;&lt;P&gt;Sale:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;ApplyMap('Config2', ShipCountry,'***')&amp;nbsp; as ShipCountry,&lt;/P&gt;&lt;P&gt;if(IsNull( ApplyMap('Config2', ShipCountry,null()))&amp;nbsp;&amp;nbsp; ,'****',[CustomerID]) as CustomerID,&lt;/P&gt;&lt;P&gt;if(IsNull( ApplyMap('Config2', ShipCountry,null()))&amp;nbsp;&amp;nbsp; ,'****',[EmployeeID]) as EmployeeID,&lt;/P&gt;&lt;P&gt;,[RequiredDate],[ShippedDate]&lt;/P&gt;&lt;P&gt;Resident Orders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Orders;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>NTNAME to display data</title>
      <link>https://community.qlik.com/t5/QlikView/NTNAME-to-display-data/m-p/1375001#M815899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have following script.&lt;/P&gt;&lt;P&gt;I am using NTNAME for access. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step1:&lt;/P&gt;&lt;P&gt;In ConfigUsers table I am populating the Country which is assigned to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConfigUsers table data&lt;/P&gt;&lt;P&gt;NTNAME,Country&lt;/P&gt;&lt;P&gt;User1,US&lt;/P&gt;&lt;P&gt;User2,UK&lt;/P&gt;&lt;P&gt;User1,Spain&lt;/P&gt;&lt;P&gt;User3,France&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step2 : I am loading Orders table in Orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step3: Creating Mapping Load Table from existing ConfigUsers. Here data is correctly populated for e.g. for User1 2 rows US and Spain are populated in Config2 table. I have checked this by creating tablebox for Config2 table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step4: Creating Sale table. Here I am trying to display all records from Orders table(created in Step2). But if ShipCountry is found in Config2 table(created in Step3) then display Country else display '****'.&lt;/P&gt;&lt;P&gt;Similarly if ShipCountry is found in Config2 table(created in Step3) then display CustomerId and so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When User1 access, there are two rows (US and Spain) in Config2 table (I have checked this by creating tablebox for Config2 table), those Shipcountry value is displayed correctly. &lt;/P&gt;&lt;P&gt;But those ShipCountry which is not assigned to User1, I want to display '****', but it shows respective Country values instead of display '****'.&lt;/P&gt;&lt;P&gt;Similarly I want to display CustomerID, EmployeeID value only if the ShipContry is found in Config2 table else display&amp;nbsp; '****'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar thing should happen if User2,User3 access the .qvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried VLOOKUP, but it also doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO ConnectionString&lt;/P&gt;&lt;P&gt;//Step1&lt;/P&gt;&lt;P&gt;ConfigUsers:&lt;/P&gt;&lt;P&gt;SQL SELECT NTNAME,[Country]&lt;/P&gt;&lt;P&gt;FROM tbl_Entitlement;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Step2&lt;/P&gt;&lt;P&gt;Orders:&lt;/P&gt;&lt;P&gt;SQL SELECT OID,[OrderID],[CustomerID],[EmployeeID],[OrderDate],[RequiredDate],[ShippedDate],[ShipVia],[Freight],[ShipName],&lt;/P&gt;&lt;P&gt;[ShipAddress],[ShipCity],[ShipRegion],[ShipPostalCode],[ShipCountry]&lt;/P&gt;&lt;P&gt;FROM Orders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Step3&lt;/P&gt;&lt;P&gt;Config2:&lt;/P&gt;&lt;P&gt;mapping load Country AS ShipCountry,Country Resident ConfigUsers;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Step4&lt;/P&gt;&lt;P&gt;Sale:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;ApplyMap('Config2', ShipCountry,'***')&amp;nbsp; as ShipCountry,&lt;/P&gt;&lt;P&gt;if(IsNull( ApplyMap('Config2', ShipCountry,null()))&amp;nbsp;&amp;nbsp; ,'****',[CustomerID]) as CustomerID,&lt;/P&gt;&lt;P&gt;if(IsNull( ApplyMap('Config2', ShipCountry,null()))&amp;nbsp;&amp;nbsp; ,'****',[EmployeeID]) as EmployeeID,&lt;/P&gt;&lt;P&gt;,[RequiredDate],[ShippedDate]&lt;/P&gt;&lt;P&gt;Resident Orders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Orders;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/NTNAME-to-display-data/m-p/1375001#M815899</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
  </channel>
</rss>

