3 Replies Latest reply on Jan 11, 2016 2:24 AM by sismeya

    Problem With Calculation on Dropdown visibility

    sismeya Rookie

      Hi,

      I wonder if anyone could help me with a visbility calculation, I'm trying to add additional options to the request form, so if someone requests a mobile phone from the Catalogue Hierachy then the additional drop down for "Mobile Tariff Displays" (Dropdown Created in requestmanagement)

       

      I have created an attribute with the following calculation, which when I test does work, it seems the dependencies dont seem to fire as when I complete the form the attribute "Mobile Tariff" is hidden , but when I select "'Requests - Hardware Request - New Equipment - Mobile Phone'" it doesn't appear , I'm using a Dependency of

       

      "_CatalogueHierarchy"

       

      result.bmp

       

       

      import System

      static def GetAttributeValue(Request):

      HideBSS = true

      MandBSS = false

      if Request._CatalogueHierarchy != null and Request._CatalogueHierarchy.FullName=='Requests - Hardware Request - New Equipment - Mobile Phone':

      HideBSS = false

      MandBSS = true

      return String.Format(":SetHidden(_ExistingMobilephone,{0});:SetMandatory(_ExistingMobilephone,{1});", HideBSS, MandBSS)