4 Replies Latest reply: Jan 21, 2011 1:38 PM by Priya Kakarla RSS

    "Always one selected value" on IE

      In this case I use a macro that selects a value and sets "always one" option. And when clicked on next tab it has to set the "always one" to false. It works perfectly fine on QlikView Desktop on a server machine but when accessing the same application through IE it is not functioning the way it has to. It is not able to set the field properties to "always one selected" to false on IE.
      sub selet1
      set flds = ActiveDocument.Fields("test")
      set vals = flds.GetPossibleValues
      flds.Select vals.Item(0).Text
      call SetOnlyOnes("test")
      end sub
      sub clear1
      call clearSetOnlyOnes("test")
      ActiveDocument.Fields("test").Clear
      end sub
      sub SetOnlyOnes(OnlyOne)
      set fld = ActiveDocument.GetField(OnlyOne)
      set prop = fld.GetProperties
      prop.OneAndOnlyOne = true
      fld.SetProperties prop
      end sub
      sub clearSetOnlyOnes(OnlyOnec)
      set fldc = ActiveDocument.GetField(OnlyOnec)
      set propc = fldc.GetProperties
      propc.OneAndOnlyOne =false
      fldc.SetProperties propc
      end sub
      please let me know if I am missing anything.
      Thanks
        • "Always one selected value" on IE
          Oleg Troyansky

          Priya,

          some of the APIs are not designed to work in the Server environment, especially those related to the UI objects. This particular attribute should actually work, since it belongs to the object "Field". It might be a glitch - I'd recommend reporting it to support.

          As a side comment - I'd encourage you to analyze your business problem and to try and eliminate the need in manipulating these properties "behind the scenes". Those manipulations are causing confusion for the end user that can't get used to any consistent behavior. Any selections made "behand the scenes" make users uncomfortable with the tool ("things are happening without my knowledge and without my control").

          Usually there are other means to satisfy the same business requirements without "playing" with selections.

          cheers,