Hello dear Formspider-Team,

i have made some experiments with LOV's and LOV-Validation.

I have noticed, that it is possible to create "lov-Field" (fields with lov) by using "textField" (and icon) or "lovField".

My requirement: The users enters a value in a "lov-Field". Now i want to validate this value, so that we get the behavior like in Oracle Forms.

That means:

case 1 The entered value is a member of the LOV-bases datasource. The value ist accepted.

case 2 The entered value is not a member of the LOV-based datasource. The value ist not accepted and the LOV is opened automatically.

What is the prefered way to solve this requirement?

I have testet to show LOV's with api_lov. But is it possible to create (generic?) code, to detect the datasource of a lov? Then i have to check the entered value against the datasource...? Which API-functions can help me?

Thanks for your help!

Kind Regards, Hermann

asked 21 Jan '14, 09:07

Hermann's gravatar image

accept rate: 0%

Hello Hermann,

Your scenario is a perfect fit for the lovField component. First create an LOV, then create an lovField like this:

<lovField column="your_target_ds_column" dataSource="your_target_datasource" bindVariable="binding_column_name" LOV="lov_name"/>

The bindVariable is the automatic lookup column name in the LOV datasource. This is the column the LOV tries to find a match with what you entered in the lovField.

Best regards,
Michiel A.


answered 21 Jan '14, 09:33

Michiel%20A's gravatar image

Michiel A
accept rate: 13%

Hi Michiel, thanks for your answer.

You are right, the lovField with datasource helps to validate the entered value. But i dont think, that the LOV is opened automatically , when an unkown value ist entered?

I think, we have to implement this?!

Greetings, Hermann

(21 Jan '14, 09:45) Hermann

Hi Hermann,

Actually, when you enter an unknown value, the LOV does open and the value entered in the lovField is shown in the LOV Search field.

Best, Michiel

(21 Jan '14, 09:49) Michiel A

Hi Michiel,

maybe i made a mistake :-)

I create a datasource and a lovField:


select ps_lgort_kuerzel, ps_lgort_mdt_nr, ps_lgort_bez, ps_lgort_int_key from vw_ps_lgort where (ps_lgort_mdt_nr = '01') and (ps_lgort_kuerzel like :LGORT_KUERZEL || '%' or :LGORT_KUERZEL is null) order by ps_lgort_mdt_nr, ps_lgort_kuerzel


<cell> <lovfield name="LOVFIELD02" column="PS_LGORT_KUERZEL" datasource="VW_PS_LGORT_MIT_BINDVAR1" emptytext="?" bindvariable="LGORT_KUERZEL" lov="lov01_LOV_lgort_mit_bvar"> <targets> <targetof lov="lov01_LOV_lgort_mit_bvar" column="PS_LGORT_KUERZEL"/> </targets> </lovfield> </cell>

Entering wrong values, no lov is opened. Pressing the lov-button, the lov is empty. In the debug-log i have found this messages:

INFO : <> PREAPPLYDELTA Event Not found ERROR : <> ( ) : => : ( ) => setComponentAttribute e_noCurrentRow:User-Defined Exception ERROR : <> ( ) : => : ( ) => Datasource "VW_PS_LGORT_MIT_BINDVAR1" has no current row. INFO : <> POSTINVOKEAPPLICATION Event is called

You have any idea what's wrong?

Thank you for your help!

Greetings, Hermann

(22 Jan '14, 04:42) Hermann

Hi Hermann,

Does the LOV has a search bindvar named 'LGORT_KUERZEL' as well (on the 3rd tab of the LOV definition?) ? Does it work correctly when entering correct or partial correct data?

Best, Michiel

(22 Jan '14, 05:38) Michiel A

Hi Michiel,

now there is a bindvar named 'LGORT_KUERZEL' ;-)

But if a wrong value is entered, the LOV is not opened automatically.

When it is opened by lov-button, the new lov-search-field contains the "wrong" value and the lov-list is empty. I can edit/clean the "wrong" value and choose a correct one.

Any idea, why the lov is not opened automatically?

Thanks for your help!

Greetings, Hermann

(22 Jan '14, 06:16) Hermann

Hmm.. no more errors in the debug log after entering wrong data and tabbing out of the field?

(22 Jan '14, 06:21) Michiel A
showing 5 of 6 show 1 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 21 Jan '14, 09:07

Seen: 2,776 times

Last updated: 22 Jan '14, 06:23

© Copyright Gerger 2017