<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged sys_queries</title>
<link>https://overflow.efficy.io/?qa=tag/sys_queries</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>
<item>
<title>Field not found error in edited system query</title>
<link>https://overflow.efficy.io/?qa=6378/field-not-found-error-in-edited-system-query</link>
<description>&lt;p&gt;Hi,&lt;br&gt;
I'm trying to load an extra field for opportunity products view. I've altered &quot;Oppo: Linked Prod&quot; entry in SYS_QUERIES, so now it's SQLTEXT value is:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Select]
PRODUCTS.K_PRODUCT
PRODUCTS.D_CREATE
PRODUCTS.OPENED
PRODUCTS.NAME
PRODUCTS.REFERENCE
PRODUCTS.FAMILY
PRODUCTS.MEMO
PRODUCTS.MEMOFORMATTED
PROD_OPPO.K_RELATION
PROD_OPPO.QUANTITY
PROD_OPPO.PRICE
PROD_OPPO.RATE
PROD_OPPO.DISCOUNT
PROD_OPPO.VAT
PROD_OPPO.TOTAL
PROD_OPPO.COMMENT
PROD_OPPO.CONSO_RATE
PROD_OPPO.CONSO_CURRCY
PROD_OPPO.CONSO_TOTAL
PROD_OPPO.D_CHANGE
PROD_OPPO.K_SORT
PROD_OPPO.K_OPPORTUNITY hidden
PROD_OPPO.F_MONTHS
LK_PROD_FAMILY.FAMILY AS FAMILYTEXT

[From]
PROD_OPPO
PROD_OPPO PRODUCTS
PRODUCTS LK_PROD_FAMILY

[Where]
PROD_OPPO.K_OPPORTUNITY = 0

[Orderby]
PRODUCTS.NAME

[Columns]
MENU,NAME,R_FAMILY,QUANTITY{EDITRELATION},PRICE{EDITRELATION},DISCOUNT{EDITRELATION},COMMENT{EDITRELATION},VAT,TOTAL,F_MONTHS,FAMILYTEXT

[Sum]
TOTAL
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and ISCUSTOM is set to 1. Then I'm using new field in custom &lt;strong&gt;TabContentProds.Oppo&lt;/strong&gt; macro, it looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;TabContentProds.Oppo {[
&amp;lt;div class=&quot;content tabs-content-item&quot; id=&quot;tab-prod&quot;&amp;gt;
&amp;lt;div class=&quot;row&quot;&amp;gt;
&amp;lt;div class=&quot;small-12 medium-1 columns&quot;&amp;gt;
&amp;lt;button type=&quot;button&quot; class=&quot;icon i-add&quot; title=&quot;&amp;lt;%GetLabel('Add Link to Product')%&amp;gt;&quot; data-msg=&quot;addProduct&quot;&amp;lt;%IfReadOnly(detail='Prod', then=' disabled')%&amp;gt;&amp;gt;&amp;lt;/button&amp;gt;
&amp;lt;%AddRelationButton(entity='Prod')%&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div class=&quot;small-12 medium-11 columns&quot;&amp;gt;
&amp;lt;h3 class=&quot;section-title&quot;&amp;gt;&amp;lt;%GetLabel(&quot;Linked products&quot;)%&amp;gt;&amp;lt;/h3&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;%OnMultiCurrency(0=, else=|%%Macro('TabContentProdsCurrcyError')|)%&amp;gt;
&amp;lt;%Delay(1)%&amp;gt;GetRelationGrid(columndefs=&quot;GridEditColumns.txt&quot;, entity=&quot;Prod&quot;,
columns=&quot;SORTHANDLE,FULLNAME,QUANTITY,F_MONTHS,PRICE,DISCOUNT,COMMENT,VAT,TOTAL,CONSO_RATE{HIDDEN},CONSO_TOTAL{HIDDEN},DELETERELATION,FAMILYTEXT&quot;)%&amp;gt;
&amp;lt;/div&amp;gt;
]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And when I'm trying to open edit opportunity window I'm getting error with the following message: DS&lt;em&gt;OppoEdit&lt;/em&gt;6&lt;em&gt;Prod&lt;/em&gt;Oppo: Field 'FAMILYTEXT' not found.&lt;/p&gt;

&lt;p&gt;Another strange thing is query is not logged in QueryLog, all I get there when trying to open edit opportunity window is:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[2021/11/29 12:43:19.823] select * from ADMIN.LK_CURRCY where K_CURRCY = 1
[2021/11/29 12:43:20.075] select A.K_USER, A.FULLNAME from ADMIN.ACC_ACCOUNTS A
inner join ADMIN.ACC_GROUPS G on A.K_USER = G.K_USER2
where G.K_USER = (select K_USER from ADMIN.ACC_ACCOUNTS where USERCODE = 'EFF_SALES') and A.KIND = '0' and (A.ISACTIVE = '1' or A.K_USER = N'2') order by A.FULLNAME
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I've restarted COM+ and IIS after making changes to SYS_QUERIES table. Any ideas what's wrong here?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br&gt;
Dmytro&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6378/field-not-found-error-in-edited-system-query</guid>
<pubDate>Mon, 29 Nov 2021 11:47:54 +0000</pubDate>
</item>
<item>
<title>Whish SYS_QUERIES is used by Efficy.consultDetail ?</title>
<link>https://overflow.efficy.io/?qa=4255/whish-sysqueries-is-used-by-efficy-consultdetail</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I've added a new field (&lt;code&gt;F_ROLE&lt;/code&gt;) in &lt;code&gt;PROJ_COMP&lt;/code&gt;. I'm trying to get the value of this new field using a consult detail, (the purpose is to copy link and the new fields value from &lt;code&gt;proj_comp&lt;/code&gt; to &lt;code&gt;docu_comp&lt;/code&gt;) &lt;/p&gt;

&lt;p&gt;I've created a new &quot;Proj : Linked Comp&quot; in &lt;code&gt;SYS_QUERIES&lt;/code&gt;, but when i execute my code i always receive an error, &lt;code&gt;F_ROLE&lt;/code&gt; not found, so i supposed consultDetail use an other queries ?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var detailCompDataSet = database.consultDetail(0, projContext, projKey, ntComp, true, true, 0);
if (!detailCompDataSet.IsEmpty) {
  detailCompDataSet.first;
  while (!detailCompDataSet.Eof) {
    var compKey = detailCompDataSet.FieldByName(&quot;K_COMPANY&quot;).AsFloat;
    database.InsertDetail2(docuContext, ntComp, compKey, false);    
    database.UpdateDetail2(docuContext, ntComp, compKey, &quot;F_ROLE&quot;, 
detailCompDataSet.FieldByName(&quot;F_ROLE&quot;).AsFloat);
    detailCompDataSet.Next;
  }
}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4255/whish-sysqueries-is-used-by-efficy-consultdetail</guid>
<pubDate>Thu, 16 May 2019 10:03:47 +0000</pubDate>
</item>
<item>
<title>What does 'isactiveparam' mean in &lt;#USERLINK&gt;?</title>
<link>https://overflow.efficy.io/?qa=3420/what-does-isactiveparam-mean-in-userlink</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Does anyone knows how parameter isactiveparam is translated in sys&lt;em&gt;queries inside tag &quot;&amp;lt;#USERLINK&amp;gt;&quot;? is it indicating the possibility to pass an argument (param1 maybe) to set &quot;ISACTIVE&quot; to 0 or 1 on calling the defined sys&lt;/em&gt;query? &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;#USERLINK table=&quot;DOCUMENTS&quot; usertable=&quot;DOCU_USER&quot; key=&quot;K_DOCUMENT&quot; isactiveparam=&quot;true&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And is there a documentation somewhere about these special tags in queris and their parameters?&lt;br&gt;
Thank you in advance for your help.&lt;br&gt;
Best Regards.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3420/what-does-isactiveparam-mean-in-userlink</guid>
<pubDate>Thu, 26 Jul 2018 10:51:36 +0000</pubDate>
</item>
<item>
<title>Origin of some filters in sys_queries</title>
<link>https://overflow.efficy.io/?qa=3410/origin-of-some-filters-in-sysqueries</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;We're having issues to find some items trough the &quot;Search Company&quot; popup (pages/Search.htm).&lt;/p&gt;

&lt;p&gt;So we compared the queries executed for these users and discovered that some filters were added at the end of the queries :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; AND ((0 &amp;lt;&amp;gt; 0) OR EXISTS (SELECT S1.K_USER FROM ADMIN.ACC_GROUPS S1, ADMIN.COMP_USER S2 WHERE S1.K_USER = S2.K_USER AND S1.K_USER2 = 61 AND S2.K_COMPANY = COMPANIES.K_COMPANY))
 AND ((0 &amp;lt;&amp;gt; 0) OR (ROLES.K_ROLE IS NULL) OR EXISTS (SELECT S1.K_USER FROM ADMIN.ACC_GROUPS S1, ADMIN.ROLE_USER S2 WHERE S1.K_USER = S2.K_USER AND S1.K_USER2 = 61 AND S2.K_ROLE = ROLES.K_ROLE))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Example of a query executed by a user who does not find the searched item (the specific filters are in the 3 last lines) :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SELECT 
  COMPANIES.K_COMPANY,
  COMPANIES.NAME,
  COMPANIES.F_S_NAME,
  COMPANIES.VAT,
  COMPANIES.BUILDING,
  (select COUNTRY from ADMIN.LK_COUNTRY L1 where L1.K_COUNTRY=COMPANIES.COUNTRY) AS R_COUNTRY,
  COMPANIES.POSTCODE,
  COMPANIES.CITY,
  COMPANIES.STREET,
  COMPANIES.STREETNUMBER,
  COMPANIES.F_BUS,
  COMPANIES.OPENED,
  ROLE_COMP.F_TALKID,
  ROLES.F_TYPE,
  (select F_NAME_NL from ADMIN.LK_CLIENT_ROLE L2 where L2.K_CLIENT_ROLE=ROLES.F_TYPE) AS R_F_TYPE,
  (REPLACE((select REPLACE(';' +  rlr.F_N_BOEKHOUDING + ';', ';;', '') from ROLE$LR rlr join role_comp rc on rc.K_ROLE = rlr.K_ROLE and rc.K_COMPANY = COMPANIES.K_COMPANY FOR XML PATH('')), ';;', ';')) AS V_N_BOEKHOUDING_COMP,
  (REPLACE((select REPLACE(';' +  rlr.F_N_LEASEHOLD + ';', ';;', '') from ROLE$LR rlr join role_comp rc on rc.K_ROLE = rlr.K_ROLE and rc.K_COMPANY = COMPANIES.K_COMPANY FOR XML PATH('')), ';;', ';')) AS V_N_LEASEHOLD_COMP
FROM
  ADMIN.COMPANIES COMPANIES
LEFT OUTER JOIN ADMIN.ROLE_COMP ROLE_COMP ON (COMPANIES.K_COMPANY = ROLE_COMP.K_COMPANY)
LEFT OUTER JOIN ADMIN.ROLES ROLES ON (ROLE_COMP.K_ROLE = ROLES.K_ROLE)
WHERE
  (ROLES.F_TYPE IS NULL OR ROLES.F_TYPE IN (7) OR NOT EXISTS(SELECT rc.k_role FROM role_comp rc INNER JOIN roles r ON rc.k_role = r.k_role WHERE rc.k_company = companies.k_company AND r.f_type IN (7)))
  AND (
(COMPANIES.F_S_NAME like N'%710081%')
) 
 AND ((0 &amp;lt;&amp;gt; 0) OR EXISTS (SELECT S1.K_USER FROM ADMIN.ACC_GROUPS S1, ADMIN.COMP_USER S2 WHERE S1.K_USER = S2.K_USER AND S1.K_USER2 = 61 AND S2.K_COMPANY = COMPANIES.K_COMPANY))
AND ((0 &amp;lt;&amp;gt; 0) OR (ROLES.K_ROLE IS NULL) OR EXISTS (SELECT S1.K_USER FROM ADMIN.ACC_GROUPS S1, ADMIN.ROLE_USER S2 WHERE S1.K_USER = S2.K_USER AND S1.K_USER2 = 61 AND S2.K_ROLE = ROLES.K_ROLE))
ORDER BY COMPANIES.NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We don't know what generates these filters.&lt;/p&gt;

&lt;p&gt;If I look for this same item, I get the following filters (the real difference is in the begin of the 2 first lines ==&amp;gt; &quot;(1 &amp;lt;&amp;gt; 0)&quot; vs &quot;(0 &amp;lt;&amp;gt; 0)&quot;):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;AND ((1 &amp;lt;&amp;gt; 0) OR EXISTS (SELECT S1.K_USER FROM ADMIN.ACC_GROUPS S1, ADMIN.COMP_USER S2 WHERE S1.K_USER = S2.K_USER AND S1.K_USER2 = 493 AND S2.K_COMPANY = COMPANIES.K_COMPANY))
AND ((1 &amp;lt;&amp;gt; 0) OR (ROLES.K_ROLE IS NULL) OR EXISTS (SELECT S1.K_USER FROM ADMIN.ACC_GROUPS S1, ADMIN.ROLE_USER S2 WHERE S1.K_USER = S2.K_USER AND S1.K_USER2 = 493 AND S2.K_ROLE = ROLES.K_ROLE))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We looked at a lot of security options in conficy but could not find anything that could tell us what it is. The only thing we know is that if we remove those lines, we get the desired results.&lt;/p&gt;

&lt;p&gt;Is there another place where we should look for this information ?&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;/p&gt;

&lt;p&gt;Angel&lt;/p&gt;
</description>
<category>Efficy Partners</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3410/origin-of-some-filters-in-sysqueries</guid>
<pubDate>Mon, 23 Jul 2018 10:11:19 +0000</pubDate>
</item>
<item>
<title>ConsultQuery on list SYS_QUERIES not working</title>
<link>https://overflow.efficy.io/?qa=3231/consultquery-on-list-sysqueries-not-working</link>
<description>&lt;p&gt;Dear All,&lt;/p&gt;

&lt;p&gt;I am trying to get the list of opportunity (keys) depending of the filters the user set up.&lt;br&gt;
In order to do that I am trying to use the consultQuery function describe in EDN : &lt;a rel=&quot;nofollow&quot; href=&quot;https://help.efficy.com/edn/serverjs&quot;&gt;&lt;/a&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://help.efficy.com/edn/serverjs&quot;&gt;https://help.efficy.com/edn/serverjs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have create the following code, but the dataset is always empty, what did I do wrong ?&lt;/p&gt;

&lt;p&gt;serverscript file : test.js&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  function test() {
    var queryHandle;
    var contextHandle = Database.openTemporaryContext();
    var params = VarArrayOf(['1', Database.currentUserId()]);
    var sourceDs = Database.consultQuery(queryHandle, contextHandle, 22, 0, params, true, true, '');

    sourceDs.Filtered = false
    sourceDs.Last
    sourceDs.First

    var result='&amp;lt;br&amp;gt;Oppo list: (';
    while (!sourceDs.Eof) {
        result += sourceDs.FieldByName('K_OPPORTUNITY').AsString + ', ';
        sourceDs.Next();
    }
    result += ')';
    return result;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Macro file : MacroListCustom.txt &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ListGrid.Oppo {[
&amp;lt;%LoadScript(test)%&amp;gt;
Launching Serverscript test....
&amp;lt;%RunScript(test)%&amp;gt;
&amp;lt;%Macro(&quot;ListGridTemplate&quot;, $COLUMNS$=&quot;MENU,NAME,R_MANAGER,D_TARGET,D_USED,R_STATUS,CONTACT,COMPANY,SUCCESS{NUMERIC},ADJBUDGET{NUMERIC}&quot;, $SUM$=&quot;ADJBUDGET&quot;)%&amp;gt;
]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And when adding the Parameters, it seems the Key of the current user does not change in the ConsultQuery Call&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=17845584832708201463&quot; alt=&quot;ConsultQuery comparison with List query&quot;&gt;&lt;/p&gt;

&lt;p&gt;Remark : the sys&lt;em&gt;query : K&lt;/em&gt;MASTER = 22 and K_DETAIL = 0 is the standard Efficy one&lt;/p&gt;

&lt;p&gt;Best Regards,&lt;br&gt;
Stéphane R.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3231/consultquery-on-list-sysqueries-not-working</guid>
<pubDate>Fri, 08 Jun 2018 06:25:02 +0000</pubDate>
</item>
<item>
<title>Join custom view in sys_queries</title>
<link>https://overflow.efficy.io/?qa=3141/join-custom-view-in-sysqueries</link>
<description>&lt;p&gt;I've got my own view &lt;code&gt;CUSTOM_R_CHECKAGENDA&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I would like to join this view in the &lt;code&gt;sys_query&lt;/code&gt; for the Agenda &lt;code&gt;35,1 35,2&lt;/code&gt; and &lt;code&gt;35,3&lt;/code&gt;. The join would be on &lt;code&gt;K_ACTION&lt;/code&gt;. How to solve this? Below the current sys_query 35,1.&lt;/p&gt;

&lt;p&gt;My final goal is to change the agenda-colors based on the value in a new field in the custom view.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Select]
ACTIONS.K_ACTION
ACTIONS.DONE
ACTIONS.D_BEGIN
ACTIONS.D_END
ACTIONS.SUBJECT
ACTIONS.D_CHANGE
ACTIONS.MODE
ACTIONS.NATURE
ACTIONS.TRAVELBEFORE
ACTIONS.TRAVELAFTER
ACTIONS.TIMEZONE
ACTIONS.TIMEZONE [TZMODIFIED]
ACTIONS.LOCATION
ACTIONS.USERS
ACTIONS.ALLDAYEVENT
ACTIONS.F_ACTIVITEIT nolookup
ACTIONS.F_DUBBEL nolookup
ACTIONS.F_BM nolookup
ACTI_USER.ISAGENDA hidden
ACC_GROUPS.K_USER2 hidden
ACTI_USER.P_D_END hidden
ACTI_USER.P_D_BEGIN hidden

[From]
ACTI_USER
ACC_GROUPS
ACTIONS


[Where]
ACTI_USER.ISAGENDA = '1' [fixed]
ACC_GROUPS.K_USER2 in 0
ACTI_USER.P_D_BEGIN &amp;lt; &quot;01/01/1970&quot;
ACTI_USER.P_D_END &amp;gt;= &quot;01/01/1970&quot; 
&amp;lt;#SkipAppendSecurityClause&amp;gt;

[Orderby]

[Options]
Distinct=1
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Efficy Partners</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3141/join-custom-view-in-sysqueries</guid>
<pubDate>Mon, 14 May 2018 09:27:00 +0000</pubDate>
</item>
<item>
<title>add condition in sys_query to get security &gt; N</title>
<link>https://overflow.efficy.io/?qa=2724/add-condition-in-sysquery-to-get-security-n</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm trying to add to custom sys&lt;em&gt;queries comany search k&lt;/em&gt;master=10, k&lt;em&gt;detail=-2 condition clause &quot;COMP&lt;/em&gt;USER.SECURITY &amp;gt; 1&quot; so users can see only companies linked to their groups with more than search rights.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Select]
COMPANIES.K_COMPANY
COMPANIES.NAME
COMPANIES.BUILDING
COMPANIES.PHONE1
COMPANIES.CITY
COMPANIES.OPENED
COMPANIES.F_COMPANY_SHORT
COMPANIES.F_COMPANY_KIND
COMP_USER.K_USER hidden

[From]
COMPANIES
COMPANIES COMP_USER

[Where]
COMP_USER.SECURITY &amp;gt; 1 [fixed]

[Orderby]
COMPANIES.NAME

[Columns]
MENU,NAME{NAMESEARCH},R_F_COMPANY_KIND,BUILDING,PHONE1{PHONE},CITY

[Options]
Distinct=1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But in the querylog, i see the query is executed but the condition clause is skipped. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SELECT DISTINCT 
  COMPANIES.K_COMPANY,
  COMPANIES.NAME,
  COMPANIES.BUILDING,
  COMPANIES.PHONE1,
  COMPANIES.CITY,
  COMPANIES.OPENED,
  COMPANIES.F_COMPANY_SHORT,
  (select F_FULLNAME from ADMINDOMO.LK_COMP_COMPANYKIND L1 where L1.K_COMP_COMPANYKIND=COMPANIES.F_COMPANY_KIND) AS R_F_COMPANY_KIND
FROM
  ADMINDOMO.COMPANIES COMPANIES,
  ADMINDOMO.COMP_USER COMP_USER
WHERE
  COMPANIES.K_COMPANY = COMP_USER.K_COMPANY
  AND (
(COMPANIES.NAME like N'%%%')
)

 AND ((0 &amp;lt;&amp;gt; 0) OR EXISTS (SELECT S1.K_USER FROM ADMINDOMO.ACC_GROUPS S1, ADMINDOMO.COMP_USER S2 WHERE S1.K_USER = S2.K_USER AND S1.K_USER2 = 12 AND S2.K_COMPANY = COMPANIES.K_COMPANY))
ORDER BY COMPANIES.NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Any one has a clue please?&lt;/p&gt;

&lt;p&gt;Thank you in advance for your help.&lt;/p&gt;

&lt;p&gt;Best Regards.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2724/add-condition-in-sysquery-to-get-security-n</guid>
<pubDate>Wed, 18 Oct 2017 11:41:26 +0000</pubDate>
</item>
<item>
<title>Which query is executed in agendaview ? What is called by GetAgendaGrid ?</title>
<link>https://overflow.efficy.io/?qa=2612/which-query-executed-agendaview-what-called-getagendagrid</link>
<description>&lt;p&gt;Hi.&lt;/p&gt;

&lt;p&gt;I'm trying to resolve an incident for &quot;Agilos&quot; (Efficy 10 7987) that only occurs with the production database, and not with the test database.&lt;/p&gt;

&lt;p&gt;I found out that it was this ajax call that returns me an error : &lt;br&gt;
/efficy.dll/agenda?&lt;em&gt;macrofile=MacroAgenda&amp;amp;&lt;/em&gt;macro=JsonAgendaMeetings&amp;amp;entity=Appo&amp;amp;active=true&amp;amp;explodegroup=true&amp;amp;user=2;3;4;27;65;66;70;95;102;103;108&amp;amp;planview=true&amp;amp;start=2017-07-13&amp;amp;end=2017-07-14&lt;/p&gt;

&lt;p&gt;So I went to MacroAgendaCustom.txt and saw this for my JsonAgendaMeetingsCustomFields : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;JsonAgendaMeetingsCustomFields {[       
    ,&quot;ProjCount&quot;:&quot;&amp;lt;#F=V_COLOR_ACTION;JSONTEXT=T;NOSPACE=T&amp;gt;&quot;
    ,&quot;ExtraInfo&quot;:&quot;&amp;lt;#F=V_EXTRAINFOSACTI;JSONTEXT=T;NOSPACE=T&amp;gt;&quot;
]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In production I get this error:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Unexpected error&lt;br&gt;
   ID:&lt;br&gt;
   Message: Field 'V&lt;em&gt;COLOR&lt;/em&gt;ACTION' not found&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But in test I receive a json response.&lt;/p&gt;

&lt;p&gt;So I compared the 2 databases starting with sys&lt;em&gt;fields:&lt;br&gt;
- I found the virtual field in the 2 databases&lt;br&gt;
- I saw that the SQL function it is pointing exists in the 2 environments and is the same&lt;br&gt;
- In sys&lt;/em&gt;queries where k_master = 35 ==&amp;gt; everything is the same&lt;/p&gt;

&lt;p&gt;I then started to look at executed queries in QueryLog&lt;em&gt;{date}.log (for the production and the test environments), and I saw that a query containing the V&lt;/em&gt;COLOR&lt;em&gt;ACTION and V&lt;/em&gt;EXTRAINFOSACTI was only executed once (when agenda is loaded).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SELECT DISTINCT 
  ACTIONS.&quot;K_ACTION&quot;,
  ACTIONS.&quot;DONE&quot;,
  ACTIONS.&quot;D_BEGIN&quot;,
  ACTIONS.&quot;D_END&quot;,
  ACTIONS.&quot;SUBJECT&quot;,
  ACTIONS.&quot;D_CHANGE&quot;,
  ACTIONS.&quot;MODE&quot;,
  ACTIONS.&quot;NATURE&quot;,
  ACTIONS.&quot;TRAVELBEFORE&quot;,
  ACTIONS.&quot;TRAVELAFTER&quot;,
  ACTIONS.&quot;TIMEZONE&quot;,
  ACTIONS.&quot;TIMEZONE&quot; AS TZMODIFIED,
  ACTIONS.&quot;LOCATION&quot;,
  cast(&quot;ADMINAGILOS&quot;.CUSTOM_ACTION_TYPE(ACTIONS.K_ACTION) as nvarchar2(100)) AS V_COLOR_ACTION,
  cast(&quot;ADMINAGILOS&quot;.CUSTOM_ACTION_EXTRAS_INFOS(ACTIONS.K_ACTION) as nvarchar2(100)) AS V_EXTRAINFOSACTI,
  cast(&quot;ADMINAGILOS&quot;.GETACT_USRNAMES(ACTIONS.K_ACTION) as nvarchar2(255)) AS USERS,
  ACTIONS.&quot;ALLDAYEVENT&quot;
FROM
  &quot;ADMINAGILOS&quot;.&quot;ACTI_USER&quot; ACTI_USER,
  &quot;ADMINAGILOS&quot;.&quot;ACC_GROUPS&quot; ACC_GROUPS,
  &quot;ADMINAGILOS&quot;.&quot;ACTIONS&quot; ACTIONS
WHERE
((ACTI_USER.&quot;ISAGENDA&quot; = TO_CHAR('1'))
AND (ACC_GROUPS.&quot;K_USER2&quot; IN (2))
AND (ACTI_USER.&quot;P_D_BEGIN&quot; &amp;lt; 42932)
AND (ACTI_USER.&quot;P_D_END&quot; &amp;gt;= 42925))
  AND ACTI_USER.K_USER = ACC_GROUPS.K_USER
  AND ACTI_USER.K_ACTION = ACTIONS.K_ACTION
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This url call : &lt;br&gt;
/efficy.dll/agenda?&lt;em&gt;macrofile=MacroAgenda&amp;amp;&lt;/em&gt;macro=JsonAgendaMeetings&amp;amp;entity=Appo&amp;amp;active=true&amp;amp;explodegroup=true&amp;amp;user=2;3;4;27;65;66;70;95;102;103;108&amp;amp;planview=true&amp;amp;start=2017-07-13&amp;amp;end=2017-07-14&lt;/p&gt;

&lt;p&gt;adds another query in the QueryLog_{date}.log that is the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SELECT DISTINCT 
  ACTIONS.&quot;K_ACTION&quot;,
  ACTIONS.&quot;DONE&quot;,
  ACTIONS.&quot;D_BEGIN&quot;,
  ACTIONS.&quot;D_END&quot;,
  ACTIONS.&quot;SUBJECT&quot;,
  ACTIONS.&quot;D_CHANGE&quot;,
  ACTIONS.&quot;MODE&quot;,
  ACTIONS.&quot;NATURE&quot;,
  ACTIONS.&quot;TRAVELBEFORE&quot;,
  ACTIONS.&quot;TRAVELAFTER&quot;,
  ACTIONS.&quot;TIMEZONE&quot;,
  ACTIONS.&quot;TIMEZONE&quot; AS TZMODIFIED,
  ACTIONS.&quot;LOCATION&quot;,
  cast(&quot;ADMINAGILOS&quot;.GETACT_FULLUSRNAMES(ACTIONS.K_ACTION) as nvarchar2(2000)) AS FULLUSERS,
  ACTIONS.&quot;ALLDAYEVENT&quot;,
  (CASE WHEN EXISTS (SELECT NULL FROM &quot;ADMINAGILOS&quot;.&quot;ACTI_USER&quot; AA, &quot;ADMINAGILOS&quot;.&quot;ACC_GROUPS&quot; AP WHERE AA.K_ACTION = ACTIONS.K_ACTION AND AA.K_USER = AP.K_USER AND AP.K_USER2 = 2) THEN 0 ELSE 1 END) AS ISCONFIDENTIAL
FROM
  &quot;ADMINAGILOS&quot;.&quot;ACTI_USER&quot; ACTI_USER,
  &quot;ADMINAGILOS&quot;.&quot;ACC_GROUPS&quot; ACC_GROUPS,
  &quot;ADMINAGILOS&quot;.&quot;ACTIONS&quot; ACTIONS
WHERE
((ACTI_USER.&quot;ISAGENDA&quot; = TO_CHAR('1'))
AND (ACC_GROUPS.&quot;K_USER2&quot; IN (2,3,4,27,65,66,70,95,102,103,108))
AND (ACTI_USER.&quot;P_D_BEGIN&quot; &amp;lt; 42931)
AND (ACTI_USER.&quot;P_D_END&quot; &amp;gt;= 42928))
  AND ACTI_USER.K_USER = ACC_GROUPS.K_USER
  AND ACTI_USER.K_ACTION = ACTIONS.K_ACTION
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I find this query nowhere. &lt;br&gt;
I was thinking that maybe I should add the field to this query.&lt;/p&gt;

&lt;p&gt;I really don't know what is going on because we can't see it.&lt;/p&gt;

&lt;p&gt;Thanks in advance&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2612/which-query-executed-agendaview-what-called-getagendagrid</guid>
<pubDate>Thu, 13 Jul 2017 10:34:37 +0000</pubDate>
</item>
<item>
<title>Can we use an array in a runquery parameter ?</title>
<link>https://overflow.efficy.io/?qa=2430/can-we-use-an-array-in-a-runquery-parameter</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I want to send the selected users to my sys_query&lt;br&gt;
But my paramter is converted into a string ( ex : '1,2,3' and i need 1,2,3 or '1','2','3' )&lt;/p&gt;

&lt;p&gt;Here is my call&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%RunQuery(&quot;ListActi&quot;, Master=&quot;32&quot;, Detail=&quot;0&quot;,mainquery=&quot;true&quot;, param1=&quot;1&quot;, param2=&quot;%%GetUserIdList(removelastseparator=T,separator=',')&quot;)%&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;My sys&lt;em&gt;query looks like the &quot;TaskList Past Unfinished&quot; sys&lt;/em&gt;query&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2430/can-we-use-an-array-in-a-runquery-parameter</guid>
<pubDate>Fri, 14 Apr 2017 07:34:38 +0000</pubDate>
</item>
<item>
<title>Modify Search query to get user's linked group in security</title>
<link>https://overflow.efficy.io/?qa=2350/modify-search-query-to-get-users-linked-group-in-security</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;A client using Efficy 10 SP2 has certain groups linked (in security) to all companies and products. So in this case all users can search only for what they concern about.&lt;/p&gt;

&lt;p&gt;But also the client wants tree view working to show all linked companies and products (just names even if they don't have access to) so they can know the hierarchy. In SP2 we can accomplish this by setting &quot;Search&quot; rights on all companies and products for all users so the tree view works as desired.&lt;/p&gt;

&lt;p&gt;But as side effect, now users get all companies and products in the search window (even the ones they don't have access to), so instead of searching 400 companies, now users get 16000 records which they have access to 400 of them.&lt;/p&gt;

&lt;p&gt;so how can i customize the search query &quot;Comp Search, K&lt;em&gt;MASTER=10, k&lt;/em&gt;DETAL=-1&quot; so it only retrieve companies linked to user's group in security.&lt;/p&gt;

&lt;p&gt;Thank you for your advise in advance.&lt;/p&gt;

&lt;p&gt;Best Regards.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2350/modify-search-query-to-get-users-linked-group-in-security</guid>
<pubDate>Fri, 10 Mar 2017 11:05:34 +0000</pubDate>
</item>
<item>
<title>How to get custom f_field with GetDetailDataset in workflow?</title>
<link>https://overflow.efficy.io/?qa=2174/how-to-get-custom-ffield-with-getdetaildataset-in-workflow</link>
<description>&lt;p&gt;I've got the following function in my workflow to automatically define the Name of an opportunity:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
function SetOpportunityName(EditOppo, Inserted){&lt;br&gt;
    var dsOppo = Database.GetMasterDataSet(EditOppo,0);&lt;br&gt;
    dsOppo.Edit;&lt;br&gt;
    var dsComp = Database.GetDetailDataSet(EditOppo, ntComp);&lt;br&gt;
    if (dsComp &amp;amp;&amp;amp; !dsComp.EOF) {&lt;br&gt;
    dsComp.First;&lt;br&gt;
    var opdrachtgever = dsComp.FieldByName('F&lt;em&gt;NAME&lt;/em&gt;KORT').AsString;&lt;br&gt;
    } else {&lt;br&gt;
    var opdrachtgever = 'OPDRACHTGEVER';&lt;br&gt;
    }&lt;br&gt;
    var dienst = Database.GetLookupValueFromKey(22000,'F&lt;em&gt;DIENST',dsOppo.FieldByName('F&lt;/em&gt;DIENST').AsInteger);&lt;br&gt;
    var onderwerp = dsOppo.FieldByName('F&lt;em&gt;ONDERWERP').AsString;&lt;br&gt;
    dsOppo.FieldByName('NAME').AsString = GetDienstAfkorting(dsOppo.FieldByName('F&lt;/em&gt;DIENST').AsInteger) + ' ' + opdrachtgever + ' ' + onderwerp;&lt;br&gt;
}\&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For the var opdrachtgever I want to look up the field F&lt;em&gt;NAME&lt;/em&gt;KORT within companies. This field is present in the database and I also added the field in the sys&lt;em&gt;query 0,10 Linked comp with the following code. &lt;br&gt;
&lt;code&gt;&lt;br&gt;
[Select]&lt;br&gt;
COMPANIES.K&lt;/code&gt;&lt;/em&gt;COMPANY&lt;br&gt;
COMPANIES.NAME&lt;br&gt;
COMPANIES.BUILDING&lt;br&gt;
COMPANIES.CITY&lt;br&gt;
COMPANIES.COUNTRY&lt;br&gt;
COMPANIES.PHONE1&lt;br&gt;
COMPANIES.WEB1&lt;br&gt;
COMPANIES.OPENED&lt;br&gt;
COMPANIES.F&lt;em&gt;NAME&lt;/em&gt;KORT&lt;br&gt;
COMPANIES.MEMO&lt;br&gt;
COMPANIES.MEMOFORMATTED&lt;br&gt;
&amp;lt;#RELATIONTABLE&amp;gt;.&amp;lt;#MASTERKEY&amp;gt; hidden&lt;/p&gt;

&lt;p&gt;[From]&lt;br&gt;
&amp;lt;#RELATIONTABLE&amp;gt;&lt;br&gt;
&amp;lt;#RELATIONTABLE&amp;gt; COMPANIES&lt;/p&gt;

&lt;p&gt;[Where]&lt;br&gt;
&amp;lt;#RELATIONTABLE&amp;gt;.&amp;lt;#MASTERKEY&amp;gt; = 0&lt;/p&gt;

&lt;p&gt;[Orderby]&lt;br&gt;
COMPANIES.NAME&lt;br&gt;
COMPANIES.BUILDING&lt;/p&gt;

&lt;p&gt;[Columns]&lt;br&gt;
MENU,NAME,CITY,R&lt;em&gt;COUNTRY,PHONE1{PHONE},WEB1{WEB},F&lt;/em&gt;NAME_KORT&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Why doesn't this work yet? At the moment I try to add or edit an opportunity I get the following error:&lt;br&gt;
&lt;code&gt;&lt;br&gt;
Error while executing Script &quot;EDatabaseError&quot; at line 41 char 2.&lt;br&gt;
 Message: &quot;DS&lt;em&gt;OppoEdit&lt;/em&gt;2&lt;em&gt;Oppo&lt;/em&gt;Comp: Field 'F&lt;em&gt;NAME&lt;/em&gt;KORT' not found&quot;&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
</description>
<category>How to</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2174/how-to-get-custom-ffield-with-getdetaildataset-in-workflow</guid>
<pubDate>Thu, 12 Jan 2017 08:33:42 +0000</pubDate>
</item>
<item>
<title>Task list : Display only user records and not group records</title>
<link>https://overflow.efficy.io/?qa=1949/task-list-display-only-user-records-and-not-group-records</link>
<description>&lt;p&gt;Hello, &lt;/p&gt;

&lt;p&gt;Can we not retrieve my group's records on my Task list ?&lt;/p&gt;

&lt;p&gt;For the moment, when my group is linked to a task, the record will be displayed on my tasklist.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1949/task-list-display-only-user-records-and-not-group-records</guid>
<pubDate>Thu, 20 Oct 2016 14:44:40 +0000</pubDate>
</item>
<item>
<title>How to add an SQL scalar function based on GETACT_USRNAMES into the basic sys_queries</title>
<link>https://overflow.efficy.io/?qa=1784/scalar-function-based-getactusrnames-basic-sysqueries</link>
<description>&lt;p&gt;I wanna change the Standard Query K_MASTER 35 by adding into the agenda the all contact linked into the screen. &lt;br&gt;
I bases my développement on the scalar function &lt;strong&gt;GETACT_USRNAMES&lt;/strong&gt; to bring all my contacts fullnames separated by ;   &lt;br&gt;
I created a new scalar and it's working when I use it into SQL server. &lt;br&gt;
It's return &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;firstname name;firstname name;firstname name&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;[CUSTOM&lt;em&gt;GETACT&lt;/em&gt;CONTNAMES] (ACTIONS.K_ACTION)&lt;/p&gt;

&lt;p&gt;But when I try tu use it into the standard query when I open the agenda I have a JSON error.&lt;br&gt;
I changed the JSON Modele by adding :&lt;br&gt;
&lt;strong&gt;&lt;em&gt;,&quot;contactFullName&quot;:&quot;&amp;lt;#F=CONTFULLNAMES;JSONTEXT=T;NOTAGS=T;nospace=T&amp;gt;&quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;#F=CONTFULLNAMES is declared into the query with this line &lt;br&gt;
 [Select] &lt;a rel=&quot;nofollow&quot; href=&quot;ACTIONS.K_ACTION&quot;&gt;CUSTOM&lt;em&gt;GETACT&lt;/em&gt;CONTNAMES&lt;/a&gt; [&lt;strong&gt;CONTFULLNAMES&lt;/strong&gt;]&lt;/p&gt;

&lt;p&gt;In MacroAgendaCustom.txt : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;JsonAgendaMeetingsCustomFields {[
    ,&quot;keyCompany&quot;: &quot;&amp;lt;#F=K_COMPANY;JSONTEXT=T;NOTAGS=T;nospace=T&amp;gt;&quot;
    ,&quot;companyName&quot;: &quot;&amp;lt;#F=COMPANY;JSONTEXT=T;NOTAGS=T;nospace=T&amp;gt;&quot;
    ,&quot;contactName&quot;:&quot;&amp;lt;#F=CONTACT;JSONTEXT=T;NOTAGS=T;nospace=T&amp;gt;&quot;
    ,&quot;keyContact&quot;:&quot;&amp;lt;#F=K_CONTACT;JSONTEXT=T;NOTAGS=T;nospace=T&amp;gt;&quot;
    ,&quot;contactFullName&quot;:&quot;&amp;lt;#F=CONTFULLNAMES;JSONTEXT=T;NOTAGS=T;nospace=T&amp;gt;&quot;
]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In the Utils.js :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;meeting.contactFullName.split(';').forEach(function (cont) {
                contacts += '&amp;lt;span class=&quot;fc-user&quot;&amp;gt;' + cont + '&amp;lt;/span&amp;gt;';
            });
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In the database : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Select]
        ACTIONS.K_ACTION
        ACTIONS.DONE
        ACTIONS.D_BEGIN
        ACTIONS.D_END
        ACTIONS.SUBJECT
        ACTIONS.D_CHANGE
        ACTIONS.MODE
        ACTIONS.NATURE
        ACTIONS.TRAVELBEFORE
        ACTIONS.TRAVELAFTER
        ACTIONS.TIMEZONE
        ACTIONS.TIMEZONE [TZMODIFIED]
        ACTIONS.LOCATION
        ACTIONS.USERS
        ACTIONS.ALLDAYEVENT
        ACTI_USER.ISAGENDA hidden
        ACC_GROUPS.K_USER2 hidden
        ACTI_USER.P_D_END hidden
        ACTI_USER.P_D_BEGIN hidden
        ACTI_CONT.K_CONTACT
        ACTI_CONT.MAIN hidden
        ACTI_CONT.CONTACT
        ACTI_COMP.K_COMPANY
        ACTI_COMP.MAIN hidden
        ACTI_COMP.COMPANY
        ACTI_PROJ.K_PROJECT
        ACTI_PROJ.MAIN hidden
        ACTI_PROJ.PROJECT
        [Select] [CUSTOM_GETACT_CONTNAMES](ACTIONS.K_ACTION) [CONTFULLNAMES]

        [From]
        ACTI_USER
        ACC_GROUPS
        ACTIONS
        ACTIONS ACTI_CONT complete
        ACTIONS ACTI_PROJ complete
        ACTIONS ACTI_COMP complete

        [Where]
        ACTI_CONT.MAIN = 1 [fixed]
        ACTI_PROJ.MAIN = 1 [fixed]
        ACTI_COMP.MAIN = 1 [fixed]
        ACTI_USER.ISAGENDA = '1' [fixed]
        ACC_GROUPS.K_USER2 in 0
        ACTI_USER.P_D_BEGIN &amp;lt; &quot;01/01/1970&quot;
        ACTI_USER.P_D_END &amp;gt;= &quot;01/01/1970&quot; 
        &amp;lt;#SkipAppendSecurityClause&amp;gt;

        [Orderby]

        [Options]
        Distinct=1
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1784/scalar-function-based-getactusrnames-basic-sysqueries</guid>
<pubDate>Wed, 27 Jul 2016 17:53:11 +0000</pubDate>
</item>
</channel>
</rss>