Forum Stats

  • 3,872,071 Users
  • 2,266,376 Discussions
  • 7,911,043 Comments

Discussions

Set value of Popup LOV with dynamic action

Norbert2
Norbert2 Member Posts: 81 Bronze Badge
edited Aug 27, 2020 5:50AM in APEX Gruppe

Hi all,

following problem:

I have two page items:

  • P1_ITEM Type "Textfield"
  • P2_ITEM Type "Popup LOV"

Changing value of P1_ITEM should set the predefined value of P2_ITEM.

I try this with dynamic action on item P1_ITEM:

  • Action: Set Value
  • Set Type: PL/SQL Function Body which selects a return value from Item P2_ITEM

But this doesn't work.

It works, if P2_ITEM is from Type "Select List".

Found article https://stackoverflow.com/questions/43944348/set-value-of-popup-lov-with-dynamic-action but here I do not know how to define the 2 actions which are mentioned.

Has anybody a idea what to do.

I'am using APEX 18.2.

Thanks in advance.

Norbert

Srini.SGerard Otin

Best Answer

  • Norbert2
    Norbert2 Member Posts: 81 Bronze Badge
    edited Jun 13, 2019 7:46AM Answer ✓

    Following approach works for me:

    • set the Popup LOV item in the dynamic action with the return value of the LOV
    • define a hidden item which is set in the dynamic action with the display value of the LOV
    • execute JavaScript Code
      • $("#<Popup LOV item>").val($v("<hidden item>"))
    Srini.S

Answers