0
votes

I am calling an apex page via URL and pass all item values in the request like

f?p=&APP_ID.:44:&SESSION.:INSERT:&DEBUG.:44:P44_NAME,P44_DESCRIPTION,P44_PARENT_PK_ID:#NAME#,#DESCRIPTION#,#PARENT_PK_ID#_#PK_ID#

In my case I have to check if the row has a parent key reference value. If yes I have to set the parent key reference value to P44_PARENT_PK_ID. Otherwise, I have to set the key reference value (#PK_ID#) to P44_PARENT_PK_ID. That's why I am passing both values split with "_" in the URL.

On page 44 I have a process on the "Before Regions" process point:

DECLARE 
  v_demilitedstring varchar2(100);
BEGIN
   v_demilitedstring := v('P44_PARENT_PK_ID');

   IF nvl(to_number(substr(v_demilitedstring, 1, instr(v_demilitedstring, '_', 1, 1) -1)), 0) = 0 then
        :P44_PARENT_PK_ID := substr(v_demilitedstring, instr(v_demilitedstring, '_', -1, 1) +1);
   ELSE
        :P44_PARENT_PK_ID := substr(v_demilitedstring, 1, instr(v_demilitedstring, '_', 1, 1) -1);
   end if;
END;

I set the success message as &P44_PARENT_PK_ID. to check if the right value is assigned to it. The procedure is working fine and the correct value is set to P44_PARENT_PK_ID. However, the assigned value is not selected in select list (Meaning the display name of value is not displayed).

How can I trigger the select list item to change it's display value?

1
Are you trying to change the options in the select list or the value that is selected? - eaolson
I'd look at the Source type for the item, as well as double-check that the LOV for the select list includes the id (or you could temporarily change it to a Text Field to check). - Jeffrey Kemp
@eaolson: I am trying to change the value. The value is set, but the display name is not selected in UI. - Uma Ilango
@Jeffrey: Yes. I checked this already. The select list LOV includes the ID that I am assigning via PLSQL code. That's why I wonder why it is not displaying the set value's display name. - Uma Ilango
What is the setup for the item? Is the select list's source set to "Always", "Database Column", "PARENT_PK_ID" ? What is the PK for the fetch row process - PK_ID? - Tom

1 Answers

1
votes

So it sounds like you have a select list generating correctly and you you want to change the value that is selected when the page loads. For that, go to the Source section of the select list item. You can drive that based on another page item, like P44_PARENT_PK_ID, a query, or a number of other options.

Make sure that the list of values for your select list will have the source value in it.