Hi,

I have 70+ tables for which I'm building grids to display and edit data, a grid for each table. Each table has a column, say client_ID, and there is Clients lookup table. I want a user to be able to select the client ID in each grid from a LOV base on the Clients table.

Thanks to this week's webinar, I got to know there is a lovField component, so I defined my client_ID as a lovfield in each grid. But the LOV doesn't return anything into the lovField unless I set a target in the LOV at design time. But then I'll have to create 70+ LOVs - one for each grid/datasource, although all LOVs would be identical except for the targets.

Is there a way to accomplish this task with a single LOV?

Thanks, Ilia

asked 25 Nov '15, 16:29

Ilia%20Sazonov's gravatar image

Ilia Sazonov
120510
accept rate: 0%


Hi Ilia,

To accomplish this, you can leave the LOV targets empty at designtime and set them at the runtime in the onClose event of your LOV. You can always access the column values of the selected row of your LOV using api_datasource.getColumnValueXX APIs, also you can use api_lov.getResponse to distinguish how the LOV is closed (By double-clicling a row or pressing OK button(api_lov.button_ok) / by pressing Cancel button or close icon(api_lov.button_cancel)).

Hope this helps,
Ibrahim

link

answered 27 Nov '15, 08:42

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

Hi Paul,

You can set the name of your components inside of the grid same with your column names. Then, you can get the name of the focused component in the grid with api_application.getFocusedComponent('Y') (and keep it into a session variable), which gives you the triggering column.

Hope this helps,
Ibrahim

link

answered 30 Nov '15, 10:17

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

How do I find out in the onClose action from which grid's row AND column that LOV got fired up? The triggering Column is important, as the row could have multiple Client_id columns (referring client, bonificated client...)

link

answered 29 Nov '15, 17:40

dipr's gravatar image

dipr
1561322
accept rate: 0%

Hi Ibrahim,

Thanks for your help! It worked as you suggested.

link

answered 01 Dec '15, 20:07

Ilia%20Sazonov's gravatar image

Ilia Sazonov
120510
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×30
×6

Asked: 25 Nov '15, 16:29

Seen: 983 times

Last updated: 01 Dec '15, 20:07


© Copyright Gerger 2017