<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged activate</title>
<link>https://overflow.efficy.io/?qa=tag/activate</link>
<description>Powered by Question2Answer</description>
<item>
<title>Show field in consult if category is activated</title>
<link>https://overflow.efficy.io/?qa=3579/show-field-in-consult-if-category-is-activated</link>
<description>&lt;p&gt;Hello Efficy team, &lt;/p&gt;

&lt;p&gt;I struggle to solve a simple problem.&lt;/p&gt;

&lt;p&gt;I have a category in companies. The customer asked me to format some information and to show the information only when the field is different form zero and the customer have rights on the category. So I did a custom field : &lt;/p&gt;

&lt;h3&gt;FormFieldsConsult&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%Macro(FieldRights
        , $myfield$=`%%GetField('$FIELD$', category=&quot;COMP$CHIFFRES&quot;, nolabel=T)`
        , $value$=`%%GetField('$FIELD$', category='$CATG$')`
        , $display$=| €|
 )%&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;MacroConsult&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;    &amp;lt;dt&amp;gt;&amp;lt;%OnArgument(Argvalue='$value$',condition='case', value='', then=||, value=0, then=||, else=`&amp;lt;%LoadScript(&quot;CommonLibrary&quot;)%&amp;gt;&amp;lt;%RunScript(formatCurrency, value='$value$')%&amp;gt; $display$ `)%&amp;gt;&amp;lt;/dt&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;My code work as expected for a company were the category has been activated.&lt;/p&gt;

&lt;p&gt;But if the category is not activated, it show &quot;0&quot;.&lt;/p&gt;

&lt;p&gt;I tried this : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt; &amp;lt;dd&amp;gt;&amp;lt;%OnArgument(Argvalue='$value$', condition='case', value='', then=||, value=0, then=||, else=|$myfield$|)%&amp;gt;&amp;lt;/dd&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But is show &quot;0&quot; again.&lt;/p&gt;

&lt;p&gt;I did activate the option &quot;displayed if not empty&quot; in conficy  : &lt;/p&gt;

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

&lt;p&gt;How can I test if the category were activated ? I thought of an SQL query but it seams a bit overkill.&lt;/p&gt;

&lt;p&gt;The client is in Efficy 10sp2+. If there is a solution in Efficy 11, this also good (the upgrade is planned).&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=3579/show-field-in-consult-if-category-is-activated</guid>
<pubDate>Mon, 01 Oct 2018 11:56:32 +0000</pubDate>
</item>
<item>
<title>Is it possible to deactivate category when choosing a value from lookup filed</title>
<link>https://overflow.efficy.io/?qa=2362/possible-deactivate-category-choosing-value-lookup-filed</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm trying to do activating/deactivating a category depending if a specific value is chosen on lookup field.&lt;/p&gt;

&lt;p&gt;first I added onchange event to lookup field to check if the a certain value is chosen then i'm activating a category, but if this value is changed to another one, then how can I deactivate the category in the edit context (this is before applying or saving the record because user needs to fill in data in the category if the certain value is chosen)&lt;/p&gt;

&lt;p&gt;Thanks in advance for your advise and help.&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=2362/possible-deactivate-category-choosing-value-lookup-filed</guid>
<pubDate>Thu, 16 Mar 2017 10:09:10 +0000</pubDate>
</item>
</channel>
</rss>