NoOneDer
NoOneDer

Reputation: 59

Oracle Apex Interactive Grid set one value for all rows

My goal is to have a button that when user clicked it, it will prompt text input. Once closed, the value inputted in prompt text will be assign/display to all the rows in a given column. So for example, I inputted '9'. Once dialog page closed, All 10 rows from column A of Interactive Grid will have '9' as a value. This is to lessen the user typing the same value for multiple rows.

Upvotes: 0

Views: 2055

Answers (1)

Littlefoot
Littlefoot

Reputation: 143163

If I understood you correctly, user enters the page that contains an interactive grid and starts entering values; you'd want to use the same value for some column in all rows user enters.

If that's so, then don't reinvent the wheel, but:

  • navigate to interactive grid's column that should have the same value throughout all rows
  • go to its properties
  • set the Duplicate copies existing value property ON

Therefore, user would enter that value only for the first row and simply duplicate that row.


Alternatively:

  • create a page item (let's call it P1_DEFAULT_VALUE)
    • set it to "Submit when ENTER pressed" (or create a submit button which would do the same; because, item's value has to be in session state, otherwise you can't use it)
  • navigate to interactive grid's column that should get value entered into P1_DEFAULT_VALUE
  • go to its properties
  • scroll down to Default section
  • set
    • type = Item
    • Item = P1_DEFAULT_VALUE

Doing so, column would "inherit" page item's value for each row entered.

Upvotes: 1

Related Questions