Hi,

i have a datasource with a query and one of the columns is a status field.

Above the panel with this datasource i want to build a controlblock with a poplist with all possible statusses. And when the user changes the value in de poplist, the datasource should requery automatically.

In the example with the search form, i can see how to bind variables.

But how do i create the poplist? I guess the only way is a datasource that selects all possible values somehow.

But even if i have this, how can i than run the query automatically when the value changes?

I hope this is possible, because it happens quite often that actions need to take place based on control blocks.

Kind regards, Jan Willem

asked 26 Oct '14, 10:42

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1431436
accept rate: 0%


Hi Jan,

But how do i create the poplist? I guess the only way is a datasource that selects all possible values somehow.

Yes. These values should either exist in a reference table that you can query or you can do select distinct or hard code them to the SQL using select 'value1' from dual union all select 'value2' from dual…

But even if i have this, how can i than run the query automatically when the value changes?

Which value are you talking about? Are you referring to the list of values shown in the pop list? If yes, then you should call api_datasource.executeQuery('myPoplistDatasource');

If you are referring to the detail grid of the pop list which shows the list of rows that have the same status selected in the populist, you should call the api_datasource.executeQuery('myDetailDatasource'); in the valueChanged event of the populist.

There is a dependant combo box example on our demo page. There is also a tutorial on how to build combo boxes.

Please note that the demos were down at the time of this writing. We are looking into the problem. It should be up soon.

Kind Regards,
Yalim

link

answered 27 Oct '14, 09:34

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
1.8k5
accept rate: 15%

Hi Yalim,

yesterday i have tried this mechanism with a checkbox (checked/not checked) and in the valueChanged event the query was executed automatically. So, that worked. I will now try this with a poplist, as i assume that the valueChanged event also works with poplist.

Kind regards,

Jan Willem

link

answered 28 Oct '14, 02:44

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1431436
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:

×13
×1
×1

Asked: 26 Oct '14, 10:42

Seen: 1,070 times

Last updated: 28 Oct '14, 02:44


© Copyright Gerger 2017