APEX-PLUGIN.COM

..the apex plugin directory

an initiative of

Add your APEX4.0 Plugin info

Describe your Plugin’s features. You can upload the Plugin’s code and documentation, or, alternatively, submit the URLs to your Website, GitHup Repository or Blog.

You are here:
Follow us on Twitter
Dynamic Action Plugin tabular form cascading select

tabular form cascading select

9

smart4solutions cascading select for tabular forms

Inspired by a really old blog by Denes Kubicek, I decided to turn his solution into a usable plugin.
The plugin supports multiple instances on one page as seen here.

  1. Create a tabular form
  2. Set the relevant items to be a select list
    1. the "parent" or "master" is a regular select list, use SQL, Shared Component, or any other means to populate your select list
    2. the "child" column should have a query that only returns a message" ie:
      select '-- please choose --' as d ,      null                  as r from dual
      or it should not return anything
      select null as d ,      null as r from   dual where  1=0
  3. Now you add the plugin (it is a dynamic action plugin)
    1. triggering element:
      This is the "master", you need to enter the NAME attribute of the item, find it by using your browsers' inspector
    2. row key:
      This is the element that holds the primary key of your tabular form. It is needed to be able to select the child's value. Find it by searching for the name attribute for the (hidden) element that holds the rows' key.
      The plugin can only handle singular primary keys, use rowid if needed
    3. child element:
      This is the "child", you need to enter the NAME attribute of the item, find it by using your browsers' inspector
    4. nothing selected text:
      Enter the text that must be displayed when nothing is chosen. (ie: "-- please make a choice --")
    5. query:
      Enter the query responsible for populating the child element. The query should return two columns: d and r (for display-value and return-value) and contain a where clause that refers to the parent elements value. That parent elements value should be preceded by a colon ("bind" parameter), as shown in the example:
      select ename d ,      empno r  from   emp  where  deptno = :deptno order by 1
    6. Child query:
      Enter the query that gets the current child elements value from the database. The query should return a single row and a single column and should have a bind variable in the where clause.
      select empno from   emplog  where  id = :l_key_val
  4. That should do the trick. Run your page.

Keywords

Oracle APEX Plugin
Company: smart4solutions
Date added: 16.8.2016
Views: 3326
Votes: 15
Reviews: 24
Min. APEX Version:
5.0
Share on Facebook
Digg! Share on Digg
Save This Page
Download
download apex plugin
If something is not correct please report it here: Report Listing
Do you have a question about this Plugin? Want to write a Review or Comment?
Login first.
Reviews / Questions / Comments are e-mailed to the author of the Plug-in.
0 
Size Limit
by TCzz
on February 14, 2017
Everything works as expected but I have some rather long strings in the LOV and it seems to be running out of memory on some items. I get an invalid character error when using the browser js console. My guess is that it is over running the boundary of the array. So it is missing the closing character.

I'm not sure what to change to increase the size a little. It doesn't need to be much bigger.

Thank you.
0 
Size Limit
by TCzz
on February 14, 2017
Everything works as expected but I have some rather long strings in the LOV and it seems to be running out of memory on some items. I get an invalid character error when using the browser js console. My guess is that it is over running the boundary of the array. So it is missing the closing character.

I'm not sure what to change to increase the size a little. It doesn't need to be much bigger.

Thank you.
0 
Variables
by Michael
on February 7, 2017
One thing that is not immediately obvious to me is the variables that the plugin is looking for. For the: Triggering element, row key, child element; I am assuming it is looking for the HTML name. Which HTML names specifically, is it looking for the fmap_#? What is the :l_key_val and I am assuming the :deptno is referencing the column deptno and not a hidden item called :deptno. Thanks for the feedback!
0 
pls help
by mondi
on October 17, 2016
select ename d , empno r from emp where deptno = :deptno order by 1

select empno from emplog where id = :l_key_val

i want to know what the two bind variables(:deptno),(:l_key_val) refers to ?
10 
Awesome plug in
by Alvin Tai
on September 12, 2016
Hi,

I manage to get it working .... The plug in worked flawlessly.

For those who need answers to my qns.

1) Create a dynamic action
2) Give whatever name you want
3) Event select after refresh
4) Selection type select region
5) item select the region where the tabular form reside
6) Action select the plug in
7) check fire on page load ....

The rest just follow the author.

Thank a lot ...
ALvin
0 
Sorry
by Alvin Tai
on September 11, 2016
Sorry for the multiple post because i got error message. Hence i am not sure it is posted or not.
10 
Pls help ...
by Alvin Tai
on September 11, 2016
Hi, i muz said your plug in save a lot of our lives. However i need some details. When i create the dynamic actions, i have the following qns.

1) What is the event should i point to ? Change?
2) What sud i select for selection type?
3) The item(s), what should I point to?
4) For the name of the triggering element, when i look at the browser inspector. Are you referring to something that look like fmap_001?

Thanks a lot
Alvin
10 
Pls help ...
by Alvin Tai
on September 11, 2016
Hi, i muz said your plug in save a lot of our lives. However i need some details. When i create the dynamic actions, i have the following qns.

1) What is the event should i point to ? Change?
2) What sud i select for selection type?
3) The item(s), what should I point to?
4) For the name of the triggering element, when i look at the browser inspector. Are you referring to something that look like fmap_001?

Thanks a lot
Alvin
10 
Pls help ...
by Alvin Tai
on September 11, 2016
Hi, i muz said your plug in save a lot of our lives. However i need some details. When i create the dynamic actions, i have the following qns.

1) What is the event should i point to ? Change?
2) What sud i select for selection type?
3) The item(s), what should I point to?
4) For the name of the triggering element, when i look at the browser inspector. Are you referring to something that look like fmap_001?

Thanks a lot
Alvin
10 
Pls help ...
by Alvin Tai
on September 11, 2016
Hi, i muz said your plug in save a lot of our lives. However i need some details. When i create the dynamic actions, i have the following qns.

1) What is the event should i point to ? Change?
2) What sud i select for selection type?
3) The item(s), what should I point to?
4) For the name of the triggering element, when i look at the browser inspector. Are you referring to something that look like fmap_001?

Thanks a lot
Alvin
Powered by Sigsiu.NET RSS Feeds

Disclaimer: The APEX Plugins on this site are not supported by Oracle Support Services.

If you have a question about a Plugin or need support: Login and select the plugin detail page. At the bottom you can enter your Question / Review / Remark.
Your message will be sent to the author of the plugin.