Basically, I have an SQL Updateable report based on the following sample SQL query:
select A, B, C from my_table;
Based on this report, I have made column B a SELECT LIST based on a Named LOV – I have also assigned this column an id of “lov_select”
Column C here is also a text area
My question and unsure how to do this, is, as this report can vary in rows, assuming this report returns 3 rows, based on the value selected from the Column B – select list, I want to use this value in column B select list to retrieve another value from a table and then return this value into Column C text are field, alongside this select list value used.
I would like to do this via a Dynamic Action.
For example:
Column A Column B (select list LOV) Column C
----------------------- ---------------------------- ------------------------------------
Row 1 NAME1 returns 5
Row 2 NAME2 returns 6
Row 3 NAME3 returns 7
So if I change row 2 Column B and select “NAME2”, I then want to execute a query using the value “NAME2” which would return a value of 6, which I then would like populated alongsde NAME2 into Column C.
Manual tabular form with source:
2 possible solutions:
Dynamic action with ajax process
True action: Execute javascript code
Fire on page load: unchecked
No affected element type
Dynamic actions only and hidden items
.deptno$(this.triggeringElement).val()P37_FIND_DEPTNOselect dname from dept where deptno = :P37_FIND_DEPTNO;P37_FIND_DEPTNOP37_FIND_DEPTNO_RESULTTrue action: Execute javascript code
Code:
Fire on page load: unchecked
Both take care of fetching the value, just depends on how you’d rather solve it.