5 Replies Latest reply: May 31, 2012 10:59 PM by Pan.Tian RSS

    LOV Validation

    930306
      I am developing a new mobile form in which I have a LOV field. So far, I am able to allow user to select a value by pressing Ctrl-L and selecting from the LOV list. I would also like the user to enter/scan a value for this LOV field and if it exists, populate other fields. If the entered value doesn't exist, prompt the user with a list of values from the LOV list. But I am having issues designing the manual entry component of the LOV field.

      Oracle documentation on Mobile development is negligible if not entirely non-existent. I have looked at other websites for basic guidance and been able to develop the form. But now I am at a point where I can't seem to find any more guidance. Can somebody here guide me on how to find this information or perhaps share examples of similar code elsewhere?

      Thanks!
        • 1. Re: LOV Validation
          HrishikeshJ
          Hi,

          In the constructor of LOVadd following code
          setValidateFromLOV(true);

          You may also choose to add code to the constructor of page (after adding lov field to page)
          field.setValidateFromLOV(true);

          It should work.

          Hrishikesh
          • 2. Re: LOV Validation
            930306
            Hrishikesh,

            Thanks for your response. I ended up using a TextField in the other form. Now, I am creating another form that requires this functionality but just adding field.setValidateFromLOV(true) in the page constructor for the LOV doesn't seem to be helping. When I try to obtain the partially entered value from the LOV field, it returns an empty string. When I enter a partial value such as "S", it still returns all values in the LOV, even those that do not start with "S".

            Do you have a code snippet you could share?

            Thanks

            Edited by: user13280779 on May 23, 2012 5:22 PM
            • 3. Re: LOV Validation
              930306
              I figured it out. When setting InputParameters for the LOV, I was using LOVName.GetValue(). I set it to the name of the LOV field instead as "xxxx.wms.MWAPageName.LovFieldName" and it started working as desired.
              • 4. Re: LOV Validation
                HrishikeshJ
                Perfect...well done!!
                • 5. Re: LOV Validation
                  Pan.Tian
                  Hi Hrishi,it is happy see you here :)

                  Pan