macwadu
macwadu

Reputation: 907

How to set status of a check box in Oracle Apex using PLSQL?

How can I set a value of a check box after submit?

I clicked the check box and when I click in the submit button, it deselects.

Upvotes: 0

Views: 5904

Answers (1)

Tony Andrews
Tony Andrews

Reputation: 132580

Having looked at the example you linked to in a comment above, I think your checkbox item is not set up correctly. Looking at the URL in the browser after checking the checkbox and pressing the Apply button I see:

http://apex.oracle.com/pls/apex/f?p=17236:555:3681260444833458::NO::P555_CHECK:

That explicitly sets the values of the checkbox item to NULL, which is normally the unchecked value. As an experiment I changed the URL to:

http://apex.oracle.com/pls/apex/f?p=17236:555:3681260444833458::NO::P555_CHECK:Y

The page reloaded with two checkboxes!:

two checkboxes

So how is your checkbox item defined? It should be defined something like this: enter image description here

i.e.

  • the number of checkbox columns should be 1
  • "display extra values" and "display null values" should both be set to No
  • the list of values should only specify the checked value (I have used 'Y'). This can be done via a named LOV rather than the way I have done it.

Also, you don't want to reset P555_CHECK to null in the page branch.

Upvotes: 1

Related Questions