<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged view</title>
<link>https://overflow.efficy.io/?qa=tag/view</link>
<description>Powered by Question2Answer</description>
<item>
<title>View or function 'R_CONTACTS' has more column names specified than columns defined.</title>
<link>https://overflow.efficy.io/?qa=5075/function-rcontacts-column-names-specified-columns-defined</link>
<description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;I'm working on a migration from 2012 to 11.3&lt;br&gt;
Db Upgrade have run without any error, i can connect, i can .. etc.&lt;/p&gt;

&lt;p&gt;But, when trying to make a query using &lt;code&gt;R_CONTACTS&lt;/code&gt;, i get this error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;View or function 'R_CONTACTS' has more column names specified than columns defined.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;DB Version is &lt;code&gt;11.3.18520.0&lt;/code&gt;&lt;br&gt;
Rdgb: SQL Server&lt;/p&gt;

&lt;p&gt;I don't know if the probleme is linked to my database, or if it is a bug/missing part in the upgrade DB, but ... i found this solution to unblock me.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EXECUTE sp_refreshview 'R_CONTACTS'
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5075/function-rcontacts-column-names-specified-columns-defined</guid>
<pubDate>Tue, 26 Nov 2019 10:50:15 +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>usinge parameter in SQL statement in queryview</title>
<link>https://overflow.efficy.io/?qa=2354/usinge-parameter-in-sql-statement-in-queryview</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm getting error &quot;Custom view has been disabled&quot; when i try use SQL statement in condition with passing parameter query &quot;userkey&quot;.&lt;/p&gt;

&lt;p&gt;is it possible to do that? like this:&lt;/p&gt;

&lt;p&gt;comp&lt;em&gt;user.keyOfUser in select F&lt;/em&gt;SRG from LK&lt;em&gt;SECURITY&lt;/em&gt;MATRIX where F_USER= 'userkey'&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=2354/usinge-parameter-in-sql-statement-in-queryview</guid>
<pubDate>Mon, 13 Mar 2017 13:38:21 +0000</pubDate>
</item>
<item>
<title>add calculated field to custom view</title>
<link>https://overflow.efficy.io/?qa=1282/add-calculated-field-to-custom-view</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm trying to add on custom view a field that's calculated (not exist on DB), it's on Main:Product, Detail:Product, the main issue is the calculated field operation is: &lt;br&gt;
PRODUCTS.PRICE1 * PROD_PROD.QUANTITY&lt;br&gt;
i tried to modify the SQL in querviews table in DB, but the special efficy SQL doesn't do operations, or at least i don't know how to do it in this SQL.&lt;/p&gt;

&lt;p&gt;does any one have an idea how to do it? or maybe a workaround to get it done?&lt;/p&gt;

&lt;p&gt;Thank you.&lt;br&gt;
Best Regards.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1282/add-calculated-field-to-custom-view</guid>
<pubDate>Wed, 27 Jan 2016 14:24:47 +0000</pubDate>
</item>
<item>
<title>Create street look-up similar to city and postal code</title>
<link>https://overflow.efficy.io/?qa=589/create-street-look-up-similar-to-city-and-postal-code</link>
<description>&lt;p&gt;Dear,&lt;/p&gt;

&lt;p&gt;I need to create an automatic street lookup: after filling in country, city and postal code when you try to fill in the street you should get a list with suggestions.&lt;/p&gt;

&lt;p&gt;I think extending the editview.js is a solution here.&lt;/p&gt;

&lt;p&gt;Is this a good solution or is there a better one?&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=589/create-street-look-up-similar-to-city-and-postal-code</guid>
<pubDate>Thu, 30 Jul 2015 12:20:20 +0000</pubDate>
</item>
</channel>
</rss>