<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged rtf</title>
<link>https://overflow.efficy.io/?qa=tag/rtf</link>
<description>Powered by Question2Answer</description>
<item>
<title>Template Script Return value containing $$ENCODE$$</title>
<link>https://overflow.efficy.io/?qa=1440/template-script-return-value-containing-encode</link>
<description>&lt;p&gt;Dear All,&lt;/p&gt;

&lt;p&gt;I get the following Template Script from Efficy France and there is a particularity in it.&lt;br&gt;
It return the value $$ENCODE$$ ... so what is it?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/*
usage
[$RunScript(name=&quot;GetListeParticipants1&quot;, file=&quot;DMS_CRSIPP&quot;,TypeResultat=&quot;var&quot;)]
var= ['NOMPRENOMFONCTION'] 
*/
function GetListeParticipants1(ContextHandle) {
                var K_DOCU = Database.GetFieldValue(ContextHandle, 'K_DOCUMENT')

                var Type = Variables.Values('TypeResultat')

                var QueryHandle;
                var SQLQuery = &quot; SELECT CONTACTS.K_CONTACT, CONTACTS.NAME,CONTACTS.FIRSTNAME, &quot; +
                               &quot; CONT_COMP.JOBTITLE &quot;+
                               &quot; from &amp;lt;#table name = 'DOCU_CONT'&amp;gt; DOCU_CONT &quot;+
                               &quot; INNER JOIN &amp;lt;#table name = 'CONTACTS'&amp;gt; CONTACTS &quot;+
                               &quot; ON DOCU_CONT.K_CONTACT = CONTACTS.K_CONTACT &quot;+
                               &quot; LEFT OUTER JOIN &amp;lt;#table name = 'CONT_COMP'&amp;gt; CONT_COMP &quot;+
                               &quot; ON (CONTACTS.K_CONTACT = CONT_COMP.K_CONTACT AND CONT_COMP.D_END IS NULL AND CONT_COMP.MAIN = '1') &quot;+
                               &quot; LEFT OUTER JOIN &amp;lt;#table name = 'COMPANIES'&amp;gt; COMPANIES &quot;+
                               &quot; ON CONT_COMP.K_COMPANY = COMPANIES.K_COMPANY &quot; +
                               &quot; where DOCU_CONT.K_DOCUMENT = :PARAM1&quot;;

                var Result='';

                var QueryContextHandle = Database.OpenTemporaryContext;
                    var ResultDS = Database.ExecuteSystemSQLQuery(QueryHandle, QueryContextHandle, SQLQuery, K_DOCU, true, true, 0);
                    ResultDS.First;
                    while (!ResultDS.Eof) {
                        var RESULTTEMP=ResultDS.FieldByName('JOBTITLE').AsString;
                        if (Type=='NOMPRENOMFONCTION' &amp;amp;&amp;amp; RESULTTEMP &amp;lt; 64) 
                            Result = Result +ResultDS.FieldByName('NAME').AsString +' '+ResultDS.FieldByName('FIRSTNAME').AsString +'[$LF]'+ResultDS.FieldByName('JOBTITLE').AsString +'[$LF]'+'[$LF]';
                        else
                            Result = Result +ResultDS.FieldByName('NAME').AsString +' '+ResultDS.FieldByName('FIRSTNAME').AsString +'[$LF]'+ResultDS.FieldByName('JOBTITLE').AsString +'[$LF]';
                        ResultDS.Next   
                    }
                return &quot;$$ENCODE$$&quot;+Result;
}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1440/template-script-return-value-containing-encode</guid>
<pubDate>Tue, 22 Mar 2016 08:48:40 +0000</pubDate>
</item>
<item>
<title>Word Template with Time-Sheet records</title>
<link>https://overflow.efficy.io/?qa=1021/word-template-with-time-sheet-records</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I would like to create a word template containing table with the timesheet records, this template will be lunched from Company consult context (we already made the link between Comp and Time in consult context). But apparently, &quot;GetRtfTable('Time')&quot; is not working. Mybe 'Time' is not considered by this function. We found a work around using &quot;Runscript&quot; in template. But my question is there any way to be able do it in the standard way &quot;GetTable&quot; or &quot;GetRtfTable&quot;? this standard entity and standard function, why it's not working? am i missing something?&lt;/p&gt;

&lt;p&gt;Please let me know your suggestions and advises.&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=1021/word-template-with-time-sheet-records</guid>
<pubDate>Fri, 18 Dec 2015 09:33:26 +0000</pubDate>
</item>
</channel>
</rss>