<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged docu_prod</title>
<link>https://overflow.efficy.io/?qa=tag/docu_prod</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to determine K_RELATION in DOCU_PROD using a direct database-update</title>
<link>https://overflow.efficy.io/?qa=3855/determine-krelation-docuprod-using-direct-database-update</link>
<description>&lt;p&gt;I'm trying to insert rows in the table DOCU_PROD using an external program. So I'm not able to use Efficy-functions. &lt;/p&gt;

&lt;p&gt;All columns are quite logical, but I'm not sure &lt;strong&gt;how to determine the content of K_RELATION&lt;/strong&gt;? Can I just define a random value? Or is it (as the name of the column suggests) a relation to another table? As far as I have seen the values do not need to be unique. &lt;/p&gt;

&lt;p&gt;Edit: I tried to set K&lt;em&gt;RELATION = 0. But when trying to edit the document afterwards it results in the following error: Vind detail met sleutel &quot;97&quot; en relatie &quot;612593356&quot; niet terug&lt;br&gt;
so somehow there must be a logical way to deterime K&lt;/em&gt;RELATION. Does someone know?&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3855/determine-krelation-docuprod-using-direct-database-update</guid>
<pubDate>Fri, 11 Jan 2019 20:39:27 +0000</pubDate>
</item>
<item>
<title>Use Products fields in Docu_Prod gridd of DocuEdit</title>
<link>https://overflow.efficy.io/?qa=3797/use-products-fields-in-docuprod-gridd-of-docuedit</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;In the products grid of DocuEdit I have a grid like&lt;/p&gt;

&lt;p&gt;PRODUCTS.NAME {text} ; DOCU_PROD.PRICE {input} ; QUANTITY {input} ; ...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First question :&lt;/strong&gt;&lt;br&gt;
Is it possible to display &lt;code&gt;PRODUCTS.F_RISKS&lt;/code&gt; as an input type: number (like &lt;code&gt;PRICE&lt;/code&gt;, &lt;code&gt;TOTAL&lt;/code&gt;, ...) and editable ?&lt;br&gt;
How to indicate to Efficy that this input is on &lt;code&gt;PRODUCTS&lt;/code&gt; and not &lt;code&gt;DOCU_PROD&lt;/code&gt; ?&lt;br&gt;
Answered by  Kristof Pauwels ==&amp;gt; not possible, solution = put these fields in DOCU_PROD&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second question :&lt;/strong&gt;&lt;br&gt;
If you go to the Macro &lt;em&gt;TodayTasks#Acti&lt;/em&gt; in &lt;strong&gt;MacroWidget.txt&lt;/strong&gt;, you can see that the field SUBJECT is displayed as  &quot;NEWLINE2EDIT&quot;&lt;br&gt;
This definition create a second line and display the subject just below the USERS&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=2628265325480676666&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;I want to do the same in the FULLNAME Column :&lt;br&gt;
- First line = FULLNAME like the standard def (name of product, and link to consult&lt;br&gt;
- Second line = number inputs to change 4 DOCU&lt;em&gt;PROD fields : F&lt;/em&gt;RISKS, F&lt;em&gt;EQUIPMENT, F&lt;/em&gt;PARTNERS, F_SUBCONTRACTORS&lt;/p&gt;

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

&lt;p&gt;Can I do that with a column def like &lt;em&gt;NEWLINE2EDIT&lt;/em&gt;, or I have to customize directly the FULLNAME.Prod definition ?&lt;br&gt;
I can't find any rowspan or colspan in the html of &lt;em&gt;TodayTasks#Acti&lt;/em&gt;&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3797/use-products-fields-in-docuprod-gridd-of-docuedit</guid>
<pubDate>Sat, 29 Dec 2018 18:33:44 +0000</pubDate>
</item>
<item>
<title>Customize SORTDELETE on DocuEdit</title>
<link>https://overflow.efficy.io/?qa=3559/customize-sortdelete-on-docuedit</link>
<description>&lt;p&gt;Hi!&lt;/p&gt;

&lt;p&gt;I am customizing the products grid on Docu Edit :&lt;br&gt;
DOCU&lt;em&gt;PROD have a 'F&lt;/em&gt;LOT' field that I use to set css classes and field definition in &lt;strong&gt;GridEditColumnsCustom.txt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the screen below :&lt;br&gt;
- first two rows : &amp;lt; tr &amp;gt; element have the class 'simple' and F&lt;em&gt;LOT is NULL&lt;br&gt;
- the third line (grey) : &amp;lt; tr&amp;gt; element have the class 'lot' and K&lt;/em&gt;PRODUCT==F&lt;em&gt;LOT&lt;br&gt;
- other : &amp;lt; tr &amp;gt; element have the class 'detail' and F&lt;/em&gt;LOT is equal to the K_PRODUCT of the third row&lt;/p&gt;

&lt;p&gt;I want to customize the SORTDELETE definition :&lt;/p&gt;

&lt;p&gt;The delete button of the third line have to delete the 'others' lines. I do that in the workflow. In this example he have to delete 4 relations, but only 2 are deleted.. I think it is because the window is refreshed too quickly, &lt;strong&gt;where can I sleep the client script for 1s to let the WF do his job ?&lt;/strong&gt; (I have already the sleep function in Custom.js)&lt;/p&gt;

&lt;p&gt;Workflow function (called by OnDeleteDetailDocuProd) :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function DeleteBatchDetails(EditHandle, Detail, K_LOT) {
  var docuProdDS = Database.GetDetailDataSet(EditHandle, ntProd);

  // filter which relations have to be deleted
  var Filter = 'F_LOT='+K_LOT+' AND F_LOT&amp;lt;&amp;gt;K_PRODUCT'; // current K_LOT relation will be remove by Efficy standard code
  var CleanFilter = decodeURIComponent(Filter).replace(/&amp;amp;#61;/gi, &quot;=&quot;).replace(/&amp;amp;lt;/gi, &quot;&amp;lt;&quot;).replace(/&amp;amp;gt;/gi, &quot;&amp;gt;&quot;)
  docuProdDS.Filtered = false
  if (CleanFilter != &quot;&quot;) {
    docuProdDS.Filter = CleanFilter
    docuProdDS.FilterOptions = 1
    docuProdDS.Filtered = true
  }

  if(docuProdDS &amp;amp;&amp;amp; !docuProdDS.IsEmpty) {
    Logger.Write('docuProdDS.recordCount='+docuProdDS.recordCount);
    var k_document = Database.GetEditKey(EditHandle);

    docuProdDS.First;
    while(!docuProdDS.EoF) {
      var k_product=docuProdDS.FieldByName('K_PRODUCT').AsFloat;
      var k_relation = docuProdDS.FieldByName('K_RELATION').AsFloat;

      Database.DeleteDetail(EditHandle, ntProd, k_product, k_relation);

      Logger.Write('docuProdDS.EoF='+docuProdDS.EoF);
      Logger.Write('Deleted DOCU_PROD ' + k_document + '-' + k_product + '('+k_relation+')');

      docuProdDS.Next;
    }
  }

  // unfilter dataset
  if (docuProdDS.Filter != &quot;&quot;) {
    docuProdDS.Filter='';
    docuProdDS.FilterOptions=0
    docuProdDS.Filtered=0
  }
}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3559/customize-sortdelete-on-docuedit</guid>
<pubDate>Mon, 24 Sep 2018 09:48:11 +0000</pubDate>
</item>
</channel>
</rss>