<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged queryview</title>
<link>https://overflow.efficy.io/?qa=tag/queryview</link>
<description>Powered by Question2Answer</description>
<item>
<title>Custom queryview with relation information from one level up</title>
<link>https://overflow.efficy.io/?qa=3504/custom-queryview-with-relation-information-from-one-level</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;is it possible to have in Efficy show information from the relation one level up? I'm struggling with this and everytime the custom queryview have an error and this is been disabled.&lt;/p&gt;

&lt;p&gt;I shall try to explain my situation. For a customer we use Main publications with linked Variants and these Variants are linked to Segments. A Segment will be linked to a Contact. Now we want to show in the Publications tab of a Contact custom information from the link between a Variant and a Segment. So I need the information from one level up in the relation instead of one level down which is default in Efficy.&lt;/p&gt;

&lt;p&gt;Update: Below how I've made the join.&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=4146676922262049069&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=15901533701977476885&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Jeroen&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3504/custom-queryview-with-relation-information-from-one-level</guid>
<pubDate>Tue, 04 Sep 2018 14:26:16 +0000</pubDate>
</item>
<item>
<title>Easy default queryviews in Efficy10</title>
<link>https://overflow.efficy.io/?qa=2478/easy-default-queryviews-in-efficy10</link>
<description>&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;in most projects the customers needs some queryviews to be by &quot;default&quot;.&lt;br&gt;
so there is a solution I ve done to help them having control about it : &lt;/p&gt;

&lt;p&gt;in the workflow add the code : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function AfterLogon(){
    initUserOptions();
}

function initUserOptions(){
    //Database.Log(&quot;Ok then&quot;);

    var 
        qh = 0,
        tc = Database.OpenTemporaryContext(),
        sql = &quot;&quot;;

    sql += &quot;select &quot;;
    sql += &quot;    V.K_QUERYVIEW, &quot;;
    sql += &quot;    (select E.NAME from admin.SYS_ENTITIES E where E.K_ENTITY = V.K_MASTER) as MASTER_NAME, &quot;;
    sql += &quot;    (select E.NAME from admin.SYS_ENTITIES E where E.K_ENTITY = V.K_DETAIL) as DETAIL_NAME, &quot;;
    sql += &quot;    (case V.K_DETAIL when -1 then 'Search' else 'Consult' end) as CONTEXT &quot;; 
    sql += &quot;from admin.QUERYVIEWS V &quot;;
    sql += &quot;where V.NAME = 'default' &quot;;

    var ds = Database.ExecuteSystemSQLQuery(qh, tc, sql, &quot;&quot;, true, false, 1);
    ds.First();

    while (!ds.EoF){
        var 
            context = ds.FieldByName(&quot;CONTEXT&quot;).AsString,
            master = ds.FieldByName(&quot;MASTER_NAME&quot;).AsString,
            detail = ds.FieldByName(&quot;DETAIL_NAME&quot;).AsString,
            key = ds.FieldByName(&quot;K_QUERYVIEW&quot;).AsString;

        var section = context + master + &quot;_&quot;;
        section += (context == &quot;Consult&quot;)? detail + &quot;_&quot;: &quot;&quot;;
        section += &quot;QueryView&quot;;

        Database.WriteString(&quot;Efficy&quot;, section, key);

        ds.Next();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The only thing you have to do after that is create a queryview where you want (it works for consult and search context, feel free to make it evolve if you need)&lt;/p&gt;

&lt;p&gt;your query view has to be named : &quot;Default&quot; and be careful that your queryview is linked to everyone.&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=2478/easy-default-queryviews-in-efficy10</guid>
<pubDate>Wed, 10 May 2017 14:16:53 +0000</pubDate>
</item>
<item>
<title>Error when using a parameter in a queryview</title>
<link>https://overflow.efficy.io/?qa=2328/error-when-using-a-parameter-in-a-queryview</link>
<description>&lt;p&gt;When using a date parameter in a queryview you receive the error:&lt;br&gt;
There was an error using the selected custom view. The custom view has been disabled.&lt;/p&gt;
</description>
<category>Errors</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2328/error-when-using-a-parameter-in-a-queryview</guid>
<pubDate>Wed, 01 Mar 2017 13:07:25 +0000</pubDate>
</item>
<item>
<title>how to assign a specific queryview as default for all the efficy's user</title>
<link>https://overflow.efficy.io/?qa=1008/how-assign-specific-queryview-default-for-all-efficys-user</link>
<description>&lt;p&gt;I want assign an Efficy query view for every user in the database to initialize my project installation. I searched into the all &quot;ACC&quot;_TABLES but nothing seem stocked there. &lt;/p&gt;

&lt;p&gt;I imagine that the information is somewhere because each user can define them.&lt;br&gt;
Any idea where I can find this information to make my mass update&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1008/how-assign-specific-queryview-default-for-all-efficys-user</guid>
<pubDate>Fri, 11 Dec 2015 09:03:59 +0000</pubDate>
</item>
<item>
<title>Efficy2014 - Queryviews - How to have avoid selection of main contact only</title>
<link>https://overflow.efficy.io/?qa=887/efficy2014-queryviews-have-avoid-selection-main-contact-only</link>
<description>&lt;p&gt;Hello,&lt;br&gt;
In the consult detail actions grid of a projet, my custommer need to see all the contacts linked to the action and not only the main one.&lt;br&gt;
Custom view automatically add the condition to retrieve the main contact linked to the action.&lt;br&gt;
How can I bypass that condition or how can I have all the contacts shown in the grid?&lt;br&gt;
Best Regards&lt;br&gt;
Anne&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=887/efficy2014-queryviews-have-avoid-selection-main-contact-only</guid>
<pubDate>Thu, 22 Oct 2015 07:40:10 +0000</pubDate>
</item>
<item>
<title>Efficy 20014 - How to retrieve Selection field of queryview in serverscript</title>
<link>https://overflow.efficy.io/?qa=871/efficy-20014-retrieve-selection-field-queryview-serverscript</link>
<description>&lt;p&gt;Hi,&lt;br&gt;
I have added the field &quot;Selection&quot; in a queryview. I would like to get this field in a serverscript to work only on selected records.&lt;br&gt;
when I inspect the element, it seems that the field name is &quot;CheckRec&lt;em&gt;&quot; + K&lt;/em&gt;action &lt;br&gt;
but when i try to retreive taht field in tje serverscript I get an error &quot;Field CheckRec_nnn not found&quot;. Here is my script. I do nor have any error of I comment the line retrieving the select field value.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var QueryHandle = Request.Argument(&quot;QueryHandle&quot;)
var K_Contact = StrToFloatDef(Request.Argument(&quot;Cont&quot;), 0)
var RecCount=0
// retrieve dataset
var DS
var ContextHandle = 0
if (QueryHandle == 0) return '&amp;lt;script&amp;gt;ShowAlert(&quot;No Query Handle defined (Query Handle = 0)&quot;)&amp;lt;/script&amp;gt;'

try {
    DS = GetDataSetFromQuery(QueryHandle)
}
catch(ex) {
    return '&amp;lt;script&amp;gt;ShowAlert(&quot;The query results are no longer available. Please refresh the original page!&quot;)&amp;lt;/script&amp;gt;'
}
DS.First
while (! DS.Eof) {
    RecCount++
    var Key = DS.FieldByName(&quot;K_ACTION&quot;).AsFloat
    var selectField=&quot;CheckRec_&quot; + Key
    var Selection=DS.FieldByName(selectField).AsFloat
    Request.Messages.Add(&quot;selectField: &quot; + selectField + &quot; &quot; + Key)

    DS.Next
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Thanks and Regards&lt;br&gt;
Anne&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=871/efficy-20014-retrieve-selection-field-queryview-serverscript</guid>
<pubDate>Tue, 20 Oct 2015 11:37:40 +0000</pubDate>
</item>
<item>
<title>Efficy 2014 - Error in queryview</title>
<link>https://overflow.efficy.io/?qa=657/efficy-2014-error-in-queryview</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;A subcategory field has been added in the product table.&lt;br&gt;
My customer tries to add this field in a Oppo_Prod queryview but gets an error.&lt;/p&gt;

&lt;p&gt;So, I've added this field in :&lt;br&gt;
1) SYS&lt;em&gt;QUERIES K&lt;/em&gt;MASTER=0, K&lt;em&gt;DETAIL=30 and K&lt;/em&gt;MASTER=22, K_DETAIL=30&lt;br&gt;
2)In MacroconsultCustom; DetailGridColumns.Oppo.Prod and DetailGridColumns..Prod&lt;/p&gt;

&lt;p&gt;The field appears correctly in standard views but we still get an error when creating a new Oppo_Prod Queryview, even without modifying anything in the new view.&lt;/p&gt;

&lt;p&gt;What's wrong?&lt;/p&gt;

&lt;p&gt;Regards&lt;br&gt;
Anne&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=657/efficy-2014-error-in-queryview</guid>
<pubDate>Tue, 18 Aug 2015 15:44:35 +0000</pubDate>
</item>
</channel>
</rss>