Hello Efficy team,
I struggle to solve a simple problem.
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 :
, $myfield$=`%%GetField('$FIELD$', category="COMP$CHIFFRES", nolabel=T)`
, $value$=`%%GetField('$FIELD$', category='$CATG$')`
, $display$=| €|
<dt><%OnArgument(Argvalue='$value$',condition='case', value='', then=||, value=0, then=||, else=`<%LoadScript("CommonLibrary")%><%RunScript(formatCurrency, value='$value$')%> $display$ `)%></dt>
My code work as expected for a company were the category has been activated.
But if the category is not activated, it show "0".
I tried this :
<dd><%OnArgument(Argvalue='$value$', condition='case', value='', then=||, value=0, then=||, else=|$myfield$|)%></dd>
But is show "0" again.
I did activate the option "displayed if not empty" in conficy :
How can I test if the category were activated ? I thought of an SQL query but it seams a bit overkill.
The client is in Efficy 10sp2+. If there is a solution in Efficy 11, this also good (the upgrade is planned).
Thanks in advance,