<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged entity</title>
<link>https://overflow.efficy.io/?qa=tag/entity</link>
<description>Powered by Question2Answer</description>
<item>
<title>Task linked to an action</title>
<link>https://overflow.efficy.io/?qa=5479/task-linked-to-an-action</link>
<description>&lt;p&gt;Hi Everyone,&lt;/p&gt;

&lt;p&gt;When editing (or creating) an action in the agenda for my current customer, I'm going to the third tab (task linked to the action) and I add one (or more) line.&lt;/p&gt;

&lt;p&gt;Then, when I save or apply, I directly have one error says : &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Ds&lt;em&gt;actiEdit&lt;/em&gt;0_Acti : Field Main not found&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But we didn't have any custom for this part. I looked in the custom and then compare in the sys_tableviews, entityviews, entities but didn't find anything strange.&lt;br&gt;
I have the same version than another customer and it's working fine in the other one.&lt;/p&gt;

&lt;p&gt;So what could be the problem ?&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5479/task-linked-to-an-action</guid>
<pubDate>Mon, 08 Jun 2020 13:02:10 +0000</pubDate>
</item>
<item>
<title>add detail to an existing entity</title>
<link>https://overflow.efficy.io/?qa=5358/add-detail-to-an-existing-entity</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;We would like to add a detail to an entity, but this entity is already created.&lt;br&gt;
To do that, we modified macro in MacroEditCustom.txt :&lt;br&gt;
EditRelationsList.Comp {[UserRelations;PrjrRelations]}&lt;/p&gt;

&lt;p&gt;But we got this error message : Invalid Detail &quot;Prjr&quot; for AddRelationButton function&lt;/p&gt;

&lt;p&gt;What are the next steps to make it work ?&lt;br&gt;
If we must modify database, can you give us table names and fields concerned ?&lt;/p&gt;

&lt;p&gt;Thank you,&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5358/add-detail-to-an-existing-entity</guid>
<pubDate>Wed, 11 Mar 2020 15:02:25 +0000</pubDate>
</item>
<item>
<title>Use entity table as a lookup</title>
<link>https://overflow.efficy.io/?qa=4511/use-entity-table-as-a-lookup</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Is it possible to define a lookup field on an entity table (for example K_LOOKUPFIELD=10000 for COMPANIES), and to filter the results ?&lt;/p&gt;

&lt;p&gt;On CompEdit I need to have a lookup field to choose another company :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The field will contain the key of the selected company&lt;/li&gt;
&lt;li&gt;Only Companies with 'F_GROUPE=1' can be selected, so I need to filter&lt;br&gt;
the lookup result&lt;/li&gt;
&lt;li&gt;This field can be used in QUERIES and display the name of the&lt;br&gt;
selected company (same on the CompEdit form)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I tried but I use two fields...&lt;br&gt;
The first one :&lt;br&gt;
F&lt;em&gt;MEMBRE&lt;/em&gt;GROUPE, used on the CompEdit form with the definition below&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=8515594803348119222&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;field.LOOKUP_MEMBRE_GROUP{[
    &amp;lt;%RunQuery(id='getGroup', store='1', sql='SELECT K_COMPANY, NAME FROM &amp;lt;#TABLE NAME=&quot;COMPANIES&quot;&amp;gt; WHERE F_GROUPE = 1')%&amp;gt;

    &amp;lt;%GetDataGrid(query=&quot;getGroup&quot;, count=-1, TemplateText=&quot;&amp;lt;select name='F_MEMBRE_GROUPE' id='F_MEMBRE_GROUPE'&amp;gt;
        &amp;lt;option value='0' selected&amp;gt;&amp;lt;/option&amp;gt;
        &amp;lt;#repeat&amp;gt;
        &amp;lt;option value='&amp;lt;#F=K_COMPANY&amp;gt;' &amp;lt;%OnField('F_MEMBRE_GROUPE', value='&amp;lt;#F=K_COMPANY&amp;gt;', then='selected')%&amp;gt; &amp;gt;&amp;lt;#F=NAME&amp;gt;&amp;lt;/option&amp;gt;
        &amp;lt;/#repeat&amp;gt;
    &amp;lt;/select&amp;gt;&quot;
    )%&amp;gt;
]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The second one : V_CENTRAL, used in QUERY and view (on the right) :&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=10537936421406913655&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;update SYS_FIELDS set
NAME='V_CENTRALE',
DATATYPE='A',
DATALENGTH=255,
USAGE='P',
LOOKUPASSOCIATE='=select NAME from COMPANIES cent where cent.K_COMPANY=COMPANIES.F_MEMBRE_GROUPE'
where K_TABLE=10000 and K_FIELD=308
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Thanks! :)&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4511/use-entity-table-as-a-lookup</guid>
<pubDate>Thu, 04 Jul 2019 10:26:25 +0000</pubDate>
</item>
<item>
<title>Link Timesheet table to another table than project</title>
<link>https://overflow.efficy.io/?qa=4218/link-timesheet-table-to-another-table-than-project</link>
<description>&lt;p&gt;Hello, &lt;/p&gt;

&lt;p&gt;We did a customisation on the timesheet a few month ago that allow user to timesheet on opportunity &lt;strong&gt;or&lt;/strong&gt; project.&lt;/p&gt;

&lt;p&gt;The customisation work fine, the customer is happy, voilà.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;BUT&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now, he want to &quot;analyse&quot; the data and make selections with them. Without native SQL, he cannot make a link between the table &quot;timesheet&quot; and &quot;opportunities&quot;, by default.&lt;/p&gt;

&lt;p&gt;I found the function tag &lt;code&gt;&amp;lt;%SelectJoinTable()%&amp;gt;&lt;/code&gt; in dialog/Tables.htm. How can I change things in &lt;code&gt;sys_relations&lt;/code&gt; and &lt;code&gt;sys_relentities&lt;/code&gt; to have the possibility to link opportunities to Timesheet ?&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4218/link-timesheet-table-to-another-table-than-project</guid>
<pubDate>Thu, 09 May 2019 19:53:42 +0000</pubDate>
</item>
<item>
<title>How to insert a project and link it to a company</title>
<link>https://overflow.efficy.io/?qa=3184/how-to-insert-a-project-and-link-it-to-a-company</link>
<description>&lt;p&gt;Hi everyone.&lt;/p&gt;

&lt;p&gt;Im working on a method with the C# proxy for add 377 projects with the same Name (Reporting)&lt;/p&gt;

&lt;p&gt;and link it to a company with the efficyKey.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;here is my code : 

 try
        {
            List&amp;lt;Company&amp;gt; Companies = GetAllCompanies();
            Companies = Companies.Where(a =&amp;gt; a.TypeRelation == CompRelationType.Participee || Convert.ToInt32(a.TypeRelation) == 9).Select(a =&amp;gt; a).ToList();

            TContextHandle EditContext;

            foreach (var Iterator in Companies)
            {
                EditContext = Proxy.OpenEditContext(&quot;PROJ&quot;, 0);

                Hashtable Fields = new Hashtable();
                Fields.Add(&quot;NAME&quot;, &quot;Reporting&quot;);

                Proxy.UpdateFields(EditContext, Fields);

                TContextHandle EditDocuProd = Proxy.OpenEditContextRelation(&quot;PROJ&quot;, EditContext.Key, &quot;COMP&quot;, Iterator.EfficyKey, -1);
                Proxy.CloseContext(EditDocuProd);
            }
        }
         catch(Exception E)
        {
            DisposeProxy();
            Helper.LogHelper.LogMessage(Helper.LogHelper.MessageType.Error, &quot;Error EfficyDataLayer.AddDossierForSoc()&quot;);
            Helper.LogHelper.LogExceptionMessage(E);
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I got an error after the CloseContext because the project is not link to any company.&lt;/p&gt;

&lt;p&gt;Do u have the right method to do that ?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;

&lt;p&gt;Vessiere Thomas.&lt;/p&gt;
</description>
<category>Remote API (JSON, SOAP, Node)</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3184/how-to-insert-a-project-and-link-it-to-a-company</guid>
<pubDate>Fri, 25 May 2018 13:31:18 +0000</pubDate>
</item>
<item>
<title>Creation of an Entity in Efficy 2014</title>
<link>https://overflow.efficy.io/?qa=50/creation-of-an-entity-in-efficy-2014</link>
<description>&lt;p&gt;I created an entity in Conficy. The generated custom contains files such as xxxEdit.htm, xxxEditForm.htm... how should I integrate these in my custom, because I think these files follow the old 2012 structure?&lt;/p&gt;

&lt;p&gt;In the generated custom, there are also two files &quot;MacroConsultCustom.txt&quot; and &quot;MacroConsultNewCustom.txt&quot;. What is the difference, and which one should I use? Should I add both to my MacroConsultCustom.txt?&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=50/creation-of-an-entity-in-efficy-2014</guid>
<pubDate>Tue, 14 Oct 2014 09:48:14 +0000</pubDate>
</item>
</channel>
</rss>