Forum Stats

  • 3,757,144 Users
  • 2,251,201 Discussions
  • 7,869,743 Comments

Discussions

Problem with select list not populating first time when the page is loaded

user5784286
user5784286 Member Posts: 78
edited May 6, 2014 11:33AM in APEX Discussions

Hi ,

          I am using apex 4.1.0.00.32 and I have a problem when using two list list and sql report in a region

my first select list has the below query

SELECT user_type "UserType", web_user_type_uid "ReturnValue"
FROM   gts_web_user_type
ORDER BY user_type

page action when value changed - submit page

my second select list will populated based on the first list value

my second select list query is

SELECT short_name "ShortName", web_user_uid "web_user_uid"

FROM   gts_web_user

WHERE  web_user_type_uid = :p36_usertype

ORDER BY short_name

page action when value changed - submit page

my report query is

select

"WEB_USER_UID",

"USER_NAME",

"SHORT_NAME",

"NAME",

gts_get_uid_to_user_type(web_user_type_uid) "USER TYPE",

"STATUS"

from "#OWNER#"."GTS_WEB_USER"

WHERE web_user_type_uid =:p36_usertype

AND   web_user_uid = :p36_shortname

ORDER BY gts_get_uid_to_user_type(web_user_type_uid), short_name

my problem is when the page first loads the first select list is populated and the second select list which needs to be populated based on the value in the first select list doesnot populate and shows null .

the second select list and the report is only populated after I start changing values in the first list and not when the page loads .

example when the page loads

my first select list has value AGENT Then my second select list should list all the agents -  but doesnot happen

when I change my selection from AGENT TO CUSTOMER Then my second select list populates and

when I com back and change my first select list value to AGENT then my second select list populates

also based on second select list my report populates . it is also has the same problem

my users need the list and the reports to populate when the page loads for the first time .

can anyone help me solve this problem .

Answers

This discussion has been closed.