0 Replies Latest reply: Oct 14, 2013 5:45 AM by Arnold Ayaoan RSS

    Select numric values in a ListBox from an Extension

    Arnold Ayaoan

      Greetings!

       

      I have have a list which contains Numeric values and I want to select a specific value on that list my extension code.

      As of now, I'm using the SelectText method of the JS API but the result is not accurate. Let's say I passed 2 on SelectText the listbox filters all the items on the listbox which starts with 2 examples are 22,200,23 etc..

      Please see below code for my codes

       

       

       

      var doc = Qv.GetCurrentDocument();
      var lb = doc.GetObject("LB01");
      lb.SetOnUpdateComplete(listboxUpdated);
      
      function listboxUpdated() {
           var arrRecords=["1","2"]
           this.Data.SelectTexts(arrRecords);
      
      }
      
      

       

      I tried using the SelectValues(arrRecords, false) method but no success yet.

      SelectValues_Error.jpg

      Please check below code for the SelectValues method

      function listboxUpdated() {     
           var arrRecords=[1,2]
           this.Data.SelectValues(arrRecords,false);
      }
      

       

      Could anyone please help shed some light how to select numeric values from my Extension?

      Thank you.

       

      Regards,

      Arnold