This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Web Interface Custom Command Visibility.

I've created a custom command in the web interface that allows setting one of the extensionAttributes to a specific value.

I would like to only show this command if the value is not set, but when editing the custom command the visibility tab only allows me to restrict the view if the attribute 'is exactly' some value.

What I would like is to make the custom command visible only if the value 'is not exactly'. Is there a way to do this?

  • Hi Ryan,

    unfortunately, the condition designer for command visibility doesn't allow you to configure 'is not'-clauses.

    As an workarround, you could use a stript-based trick that replaces 'not set'-values (empty values) with a special string, say "<%NOTSET%>" and then use a clause extensionAttribute1 is exactly <%NOTSET%>.

    function onPostGet($Request)

    {

      '-- read value of attribute extensionAttribute1from $Request

      ' -- and if it's empty, write <%NOTSET%> to the attribute of $Request

    }

  • That's what I was afraid of.

    Thanks for the help.

  • Can it be done by editing "Web interface" settings xml. What null value evaluation syntax would then be?