<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged querytag</title>
<link>https://overflow.efficy.io/?qa=tag/querytag</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to show only the records directly linked to the connected user in list view (USERSELECTION query tag)?</title>
<link>https://overflow.efficy.io/?qa=7170/records-directly-linked-connected-list-userselection-query</link>
<description>&lt;p&gt;&lt;strong&gt;@Stéphane Roncin&lt;/strong&gt; pointed out that , since the Enterprise 2021 and + , the Oppo list view don't show the records of groups that are linked to the record and the connected user is part of (linked to the group). It only shows the records that are directly linked to the user. Which wasn't the case for version under 2021.&lt;/p&gt;

&lt;p&gt;The difference is in the the SYS&lt;em&gt;QUERIES:  K&lt;/em&gt;MASTER(22), K_DETAIL(0).&lt;br&gt;
&lt;code&gt;&amp;lt;#USERSELECTION usertable=&quot;OPPO_USER&quot; key=&quot;K_OPPORTUNITY&quot; isactiveparam=&quot;true&quot; directlink=&quot;true&quot;&amp;gt; U1&lt;/code&gt; the argument directlink=&quot;true&quot;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;directlink&lt;/strong&gt; - &lt;em&gt;Optional argument, if not empty, consider only items directly linked to the users, do no consider groups&lt;/em&gt; (see: &lt;a rel=&quot;nofollow&quot; href=&quot;https://help.efficy.io/edn/querytags#userselection)&quot;&gt;https://help.efficy.io/edn/querytags#userselection)&lt;/a&gt; . In case if you want the behavior from previous versions just remove the argument &lt;code&gt;directlink&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now. If  you want to have the same behavior as in Oppo for other Entities list view you need to change the SYS_QUERIES list of your entity  and use USERSELECTION. &lt;/p&gt;

&lt;p&gt;Ex.: Companies List (SYS&lt;em&gt;QUERIES: K&lt;/em&gt;MASTER(10), K_DETAIL(0))&lt;/p&gt;

&lt;p&gt;Standard version: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Select]
COMPANIES.K_COMPANY
COMPANIES.NAME
COMPANIES.BUILDING
COMPANIES.CITY
COMPANIES.COUNTRY
COMPANIES.PHONE1
COMPANIES.EMAIL1
COMPANIES.WEB1
COMPANIES.OPENED
COMPANIES.LONGITUDE
COMPANIES.LATITUDE
COMPANIES.TAGS
COMPANIES.D_CREATE
COMPANIES.D_CHANGE
COMPANIES.MEMO
COMPANIES.MEMOFORMATTED

[From]
COMPANIES

[Where]
COMPANIES.OPENED = 0
&amp;lt;#USERLINK table=&quot;COMPANIES&quot; usertable=&quot;COMP_USER&quot; key=&quot;K_COMPANY&quot; isactiveparam=&quot;true&quot;&amp;gt;

[Orderby]
COMPANIES.NAME

[Columns]
MENU,NAME,CITY,R_COUNTRY,PHONE1{PHONE},EMAIL1{EMAIL},TAGS
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Customized version: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Select]
COMPANIES.K_COMPANY
COMPANIES.NAME
COMPANIES.BUILDING
COMPANIES.CITY
COMPANIES.COUNTRY
COMPANIES.PHONE1
COMPANIES.EMAIL1
COMPANIES.WEB1
COMPANIES.OPENED
COMPANIES.LONGITUDE
COMPANIES.LATITUDE
COMPANIES.TAGS
COMPANIES.D_CREATE
COMPANIES.D_CHANGE
COMPANIES.MEMO
COMPANIES.MEMOFORMATTED

[From]
COMPANIES
&amp;lt;#USERSELECTION usertable=&quot;COMP_USER&quot; key=&quot;K_COMPANY&quot; isactiveparam=&quot;true&quot; directlink=&quot;true&quot;&amp;gt; U1

[Where]
COMPANIES.OPENED = 0
&amp;lt;U1.&amp;lt;#FIELD name=&quot;K_COMPANY&quot; fortable=&quot;COMP_USER&quot;&amp;gt; = COMPANIES.K_COMPANY&amp;gt;

[Orderby]
COMPANIES.NAME

[Columns]
MENU,NAME,CITY,R_COUNTRY,PHONE1{PHONE},EMAIL1{EMAIL},TAGS
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It is not mentioned in &quot;Efficy Query Tag&quot; documentation  but you have to update SYS_SETTINGS too. &lt;br&gt;
&lt;code&gt;Designer &amp;gt; SYS_SETTINGS &amp;gt; Efficy &amp;gt; entityListsWithTagUserSelection&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;entityListsWithTagUserSelection&lt;/code&gt; takes into account the keys of entities separated by semicolon &lt;code&gt;&quot;;&quot;&lt;/code&gt;. Ex.:  &lt;code&gt;&quot;entityListsWithTagUserSelection&quot;: &quot;10;22&quot;,&lt;/code&gt;. &lt;em&gt;(22 is Oppo per default)&lt;/em&gt;&lt;br&gt;
If you don't provide the entity in SYS_SETTINGS  the USERSELECTION will not behave as intended.&lt;/p&gt;

&lt;p&gt;Many thanks to &lt;strong&gt;Stephane Roncin&lt;/strong&gt; for pointing it out and for explaining. &lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=7170/records-directly-linked-connected-list-userselection-query</guid>
<pubDate>Wed, 09 Apr 2025 14:02:26 +0000</pubDate>
</item>
</channel>
</rss>