Discussions
Categories
- 196.7K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.8K Databases
- 221.5K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 477 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.8K SQL & PL/SQL
- 21.3K SQL Developer
- 295.4K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.1K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 153 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 394 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 170 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 230 Portuguese
Tabular form - Different LOV for different rows

partlycloudy
Member Posts: 8,160 Silver Trophy
In a tabular form column, is it possible to have a select list whose values depend on some other column in the row? There doesn't appear to be a way to use #COL# notation to refer to current row values in the LOV query definition.
Ideas? Thanks
Ideas? Thanks
Best Answer
-
Try the apex_util.savekey_num/vc2 and keyval_num/vc2 API's. Basically you call the savekey_num in your query and for each row it sets a package variable which can be retrieved by the keyval_num/vc2 call in your LOV query.
Answers
-
Try the apex_util.savekey_num/vc2 and keyval_num/vc2 API's. Basically you call the savekey_num in your query and for each row it sets a package variable which can be retrieved by the keyval_num/vc2 call in your LOV query.
-
Hi,
I think, you are aware of Manual Tabular Form.
You may want to check this:-
http://apex.oracle.com/pls/otn/f?p=31517:176:2252546497434138::::: -
Depends on what he is looking for - that link shows cascading selects, and while a valid solution is not the type of problem I ran into.
I had a tabular form where I needed to reference one of the column values as a bind variable in the LOV - it was about giving completely different choices in the LOV based on the first column (which is just a display text). You unfortunately cant say something like this in the LOVwhere some_column = #FIRSTCOL#
Now you could always just concatenate in the value, but that will blow away the shared pool and that's never good. The savekey procedure allows a workaround to that. If you don't have cascading selects or something to "change" then your solution won't necessarily work. -
Scott - My situation is exactly the same as yours i.e. I just need a different select list on each row, not cascading lists. I will try out your suggestion. Thanks
-
It's pretty easy but if you need a hand let me know and I can post some sample code for you.
-
Hi Scott,
Thanks ..I formed some idea about APEX_UTIL.KEYVAL_NUM. I have a problem where I am not able to decide if I can make use of this package and solve..
Can you please have a look at this thread.. 4222311
I have a SQL which populates a tabular form on the page.Coulmn1 some text, Column 2 is to show a drop down as YES and NO. i am trying to freeze the option for rows 2,3,4 as NO, if the Option choosen in first is NO.
So, what I am trying to ask is..can I save my first selection in a global variable and use it in where clause of [select list query] the second drop down..Not sure how I can do this..Appreciate if you can show me a direction.
Thanks,
Chaitu. -
Sc0tt
can you please give query example for APEX_UTIL.SAVEKEY_NUM and APEX_UTIL.KEYVAL_NUM how to use it -
never mind i managed it, this is what i did hope it helps some one
select
"ID",
"ID" ID_DISPLAY,
"CITY_ID",
(SELECT CITY_NAME FROM CITIES WHERE ID = CITY_ID) CITY_NAME,
APEX_UTIL.SAVEKEY_NUM(CITY_ID) cid,
"NETWORK_ID"
from "#OWNER#"."M_LOCATIONS"
then created a lov NETWORK
select NETWORK_TYPE display_value, ID return_value
from NETWORKS
where city_id = APEX_UTIL.KEYVAL_NUM
order by 1
Then attached this lov to "NETWORK_ID" -
Sorry I realize this is an old thread so maybe Apex 4.1 does things different but I was trying Binepal suggestion and so think this could be useful to others.
I seem to only be able to get this to work if I change my tabular form to "Use Generic Column Names (parse query at runtime only) " and then I switch back to "to Use Query-Specific Column Names and Validate Query" . However then I lose the [row selector] column which I think is required because any updates i now try to make give me "Column must have a value" on any changes I submit.
Any ideas on what I may be doing wrong?
Thanks!
Saul -
Hello.
I have exactly the same problem.
It doesn't work until i change my tabular form to "Use Generic Column Names (parse query at runtime only) ".
When i change back to "Use Query-Specific Column Names and Validate Query", it works. But when i after that change something in report attributes, it stops working.
Did you solve the problem?
Thanks.
Regards,
Dejan
This discussion has been closed.