Article ID: 120572, created on Mar 17, 2014, last review on May 7, 2014

  • Applies to:
  • APS 2.x

Problem

I need to make an item visible/invisible based on a value for a setting, how do I do that?

Resolution

You need to use RQL to check for equality in navigation in APP-META.xml:

<item id="tab2" label="tab_2" visible="globals.PROPERTY3=eq=should_be_visible">

Note that 'globals' is a variable declared in the same view:

<navigation id="ccp" label="Application">
    <var name="globals" type-id="http://vendor.com/application/globals/1.0"/>
    <plugs-to id="http://www.aps-standard.org/ui/service"/>
        <...>
        <item id="secret_tab" label="Secret Tab" visible="globals.PROPERTY3=eq=should_be_visible">
        </item>
        <...>
</navigation>

So this tab will be shown only if the value of property PROPERTY3 of linked resource of type http://vendor.com/application/globals/1.0 has value "should_be_visible", if it contains any other string the tab will be hidden.

70bf700e0cdb9d7211df2595ef7276ab 717db81efe94e616312b74fb03a5d474

Email subscription for changes to this article
Save as PDF