This discussion is archived
1 Reply Latest reply: Sep 25, 2012 1:14 PM by Howard (... in Training) RSS

Semantics of Select List Variables

Howard (... in Training) Pro
Currently Being Moderated
Below is a post from Arijit Kanrar from May 4, 2012. It was in an old thread and I don't believe he opened a new thread for it. I'm starting my post with it because I have a similar problem. Here's what he said.
I have a select list (Select Event) and that select list is the parent for the LOV of another select list (Select User).

Also there is a report region which must refresh when the Event list changes and uses the event list in its region source. I used dynamic actions to implement this.

However it is not working consistently and usually behaves very weird. For the purpose of testing I created 2 events and the first event has 6 users associated and the second event has 3 users associated.

===> Below is the part that made me take notice: - HVC
But when I select the first event in the list nothing happens. And then when I select the second event in the list the report region refreshes and shows me the users associated with the first event. Like it is still reading the previous value of the event select list.

Also this refresh is not consistent. It happens sometimes. Other times nothing happens.
Now to my problem: - HVC
I have a similar probem using APEX on Oracle 11.2.x.x. Say, I select A from my select list (P1_SL) on page 1. Then I use &P1_SL. in a region title on that page and I display &P1_SL. in a text display field. Sometime all instances of the select list variable have the same value and other times, only some of them are NOT updated. Sometimes, all three are different! I set :P1_SL to a global variable (say "A") on page load and the select list shows "A" on the page. But it's as if the variable itself has not been set because some prior value appears for &P1_SL. in the region header and in the session state display.

It's as if I can select, say "A", and the page redisplays with A showing in the the select list. But the value of the select list variable -- as displayed elsewhere in that same region is not "A".

I'd like to know:
1) if others have seen unexpected select list variable behavior, and
2) what they were able to do about it.

Perhaps this could be handled by a submit page but I don't want to add a submit button.

Thanks, Howard
  • 1. Re: Semantics of Select List Variables
    Howard (... in Training) Pro
    Currently Being Moderated
    I didn't know enough about how Select Lists work. I know more now. One can use a global variable (application item) and this needs to be specified in the Source Value Expression like &global_variable_name(followed by period!). The Source Used should be set to "Always, replacing ..." and the Source Type shoudl be set to Static Assignment. That way the global variable is passed to the select list.

    Note: When I got this to work, I then had to clear my browser cache to get a new session each time. Otherwise, it reconnected to the prior existing session and my initializations did not execute for "On New Instance". One way to handle that is to place initialization code on a "no template" region on Page 0 and execute it only for your login page. The every login gets a re-initialization.



  • Correct Answers - 10 points
  • Helpful Answers - 5 points