<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged form-definition</title>
<link>https://overflow.efficy.io/?qa=tag/form-definition</link>
<description>Powered by Question2Answer</description>
<item>
<title>When adding D_CREATE to the consult form of a Case, the hours are 2h off.</title>
<link>https://overflow.efficy.io/?qa=6127/when-adding-dcreate-the-consult-form-case-the-hours-are-off</link>
<description>&lt;p&gt;When adding D_CREATE to the consult form of a Case, the hours are 2h off.&lt;/p&gt;

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

&lt;p&gt;What way is the best to show this date correctly?&lt;/p&gt;

&lt;p&gt;The version is Efficy 11.3&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6127/when-adding-dcreate-the-consult-form-case-the-hours-are-off</guid>
<pubDate>Tue, 25 May 2021 09:05:26 +0000</pubDate>
</item>
<item>
<title>Is there a way to get a list of user in a formFieldConsult, from a multivalue</title>
<link>https://overflow.efficy.io/?qa=3977/is-there-way-get-list-user-formfieldconsult-from-multivalue</link>
<description>&lt;p&gt;Hello Efficy Team, &lt;/p&gt;

&lt;p&gt;A customer have a list of multivalue, pointing on ACC_ACCOUNT.&lt;br&gt;
We want to show the result in FormFieldCustom.&lt;/p&gt;

&lt;p&gt;Is there a better way than this ?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%Delay(1)%&amp;gt;RunQuery(id=listOfUsers$FIELD$, sql=|
    select value from string_split(
    (select $FIELD$ from proj$cide where k_project = :param1
    ), ';') where value &amp;lt;&amp;gt; ''
|, param1='%%GetKey()')%&amp;gt;

&amp;lt;dt&amp;gt;
    &amp;lt;%Delay(1)%&amp;gt;GetDataGrid(query='listOfUsers$FIELD$', templateText=|
        &amp;lt;#repeat&amp;gt;
            &amp;lt;%Delay(2)%&amp;gt;GetUserName(param='&amp;lt;#F=value&amp;gt;')%&amp;gt;
        &amp;lt;/#repeat&amp;gt;
    |)%&amp;gt;
&amp;lt;/dt&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(as you may have guessed, this is still Efficy 10sp2+. But any suggestion for Efficy 11&amp;gt; are welcome !)&lt;/p&gt;

&lt;p&gt;Thanks in advance, &lt;/p&gt;

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3977/is-there-way-get-list-user-formfieldconsult-from-multivalue</guid>
<pubDate>Thu, 21 Feb 2019 20:43:46 +0000</pubDate>
</item>
<item>
<title>Appy LOOKUPUSERGROUP definition on in edit form and relation form</title>
<link>https://overflow.efficy.io/?qa=3694/appy-lookupusergroup-definition-edit-form-and-relation-form</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I customized products a bit :&lt;br&gt;
PROFILES: new field F&lt;em&gt;MANAGER (display on ProfEdit))&lt;br&gt;
PROD&lt;/em&gt;PROF : new field F_MANAGER (display on ProdProfEdit)&lt;/p&gt;

&lt;p&gt;They will obviously contain a list of users from a RunQuery. I tried to customized them but in both cases the field is display as number input :&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=5215118938223793964&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PROFILES.F_MANAGER&lt;/strong&gt; : the user list depends on a group so I want to reuse the same definition as OPPORTUNITIES.MANAGER on OppoEdit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;field.LOOKUPUSERGROUP.Prof {[&amp;lt;%Macro(&quot;GroupUsersLookup&quot;, $GROUPUSERCODE$=&quot;PROF&quot;, $FIELDNAME$=&quot;F_MANAGER&quot;)%&amp;gt;]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;PROD&lt;em&gt;PROF.F&lt;/em&gt;MANAGER&lt;/strong&gt; :&lt;br&gt;
After a few search it seems that relation form use field definition in FormFieldsEdit too (TabContentFields)&lt;br&gt;
Here the user list depends of the user linked to the Profile so I customized the definition:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;field.PROFMANAGER.Prod.Prof, field.PROFMANAGER.Prof.Prod {[
  &amp;lt;%RunQuery(id=&quot;ProdProfManagers&quot;, sql=&quot;select [User].K_USER, [User].FULLNAME from &amp;lt;#TABLE NAME=PROF_USER&amp;gt; PU join &amp;lt;#TABLE NAME=ACC_ACCOUNTS&amp;gt; [User] on PU.K_USER=[User].K_USER and [User].KIND=0 and [User].ISACTIVE=1 where PU.K_PROFILE=:param1&quot;, param1=&quot;%%OnEntity(Prod=`%%GetArgument('detailkey')`, Prof=`%%GetArgument('key')`&quot;)%&amp;gt;
  &amp;lt;select style=&quot;$STYLE$&quot; title=&quot;&quot; id=&quot;$FIELD$&quot; name=&quot;$FIELD$&quot; data-placeholder=&quot;&amp;lt;%GetLabel('Select Value')%&amp;gt;...&quot; &amp;lt;%IfReadOnly(then='disabled')%&amp;gt;&amp;gt;
    &amp;lt;option&amp;gt;&amp;lt;/option&amp;gt;
  &amp;lt;%Delay(1)%&amp;gt;GetDataGrid(query=&quot;ProdProfManagers&quot;, count=-1, TemplateText=|&amp;lt;#repeat&amp;gt;
    &amp;lt;option value='&amp;lt;#F=K_USER&amp;gt;' &amp;lt;#I=K_USER;&amp;lt;%GetField('$FIELD$')%&amp;gt;=selected=&quot;selected&quot;;#ELSE=&amp;gt;
    &amp;lt;%OnArgument(ArgValue=`%%GetField('$FIELD$')`,value='',then=`&amp;lt;#I=K_USER;&amp;lt;%GetUserKey()%&amp;gt;=selected=&quot;selected&quot;;#ELSE=&amp;gt;`%&amp;gt;&amp;gt;&amp;lt;#F=FULLNAME&amp;gt;&amp;lt;/option&amp;gt;&amp;lt;/#repeat&amp;gt;|
  )%&amp;gt;
  &amp;lt;/select&amp;gt;
]}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I use these definition in the form manager in the designer&lt;/p&gt;

&lt;p&gt;I copy/paste &lt;strong&gt;MacroLibrary.txt&lt;/strong&gt;/GroupUsersLookup and change it a bit to create my PROFMANAGER definition&lt;br&gt;
Can anyone help me pls ?&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3694/appy-lookupusergroup-definition-edit-form-and-relation-form</guid>
<pubDate>Fri, 30 Nov 2018 10:30:43 +0000</pubDate>
</item>
<item>
<title>FormFieldsCustom FIELD definition for Projects: PICTURE with query</title>
<link>https://overflow.efficy.io/?qa=1723/formfieldscustom-field-definition-projects-picture-query</link>
<description>&lt;p&gt;I am doing a upgrade from Efficy 2012 to Efficy 10.&lt;/p&gt;

&lt;p&gt;Can someone help met with the correct syntax for a&lt;br&gt;
FormFieldsCustom FIELD definition: PICTURE with query.&lt;br&gt;
The fields shows a square with cross. I think the picture-url is not correct.&lt;/p&gt;

&lt;p&gt;My current syntax @FormFieldsCustom.txt is:&lt;/p&gt;

&lt;p&gt;field.PICTURE.Proj {[ &amp;lt; dt&amp;gt;&lt;br&gt;
    &lt;img src=&quot;img?consulthandle=     &amp;lt;%GetDataGrid(query=&quot; class=&quot;PicsThumb Selected&quot; title=&quot;&quot; alt=&quot;image&quot;&gt;&amp;amp;detailkey=&amp;lt;#F=K_FILE&amp;gt;_&amp;lt;#F=VERSION&amp;gt;&amp;amp;field=PICTURE&amp;amp;maxwidth=$MAXSIZE$&amp;amp;maxheight=$MAXSIZE$&amp;amp;quality=1&amp;amp;format=JPEG') 
    no-repeat scroll center center transparent;&quot;/&amp;gt;|)%&amp;gt;
    &amp;amp;field=PICTURE&quot; onerror=&quot;var _src = '../efficy/imgnew/default-user.jpg';if (this.src!==_src){this.src = _src;}&quot;&amp;gt;&lt;br&gt;
    ]} &lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1723/formfieldscustom-field-definition-projects-picture-query</guid>
<pubDate>Wed, 22 Jun 2016 12:47:41 +0000</pubDate>
</item>
</channel>
</rss>