Andrey Shevchenko
Andrey Shevchenko

Reputation: 11

how to call pl sql function from apex item?

I'm new to Oracle Application Express 4.1.0. And I have a situation with that: on a apex page I've a checkbox item. So, I need to get the condition of checkbox(checked/unchecked) and put some code (i need to call a function from database) in some section on apex item page. There a lot sections there. Some of them: List of values, Source, Conditions.. And I don't know exactly where to write code. I would appreciate any help. Because surfing the net didn't get much results.

Upvotes: 1

Views: 3449

Answers (1)

romeuBraga
romeuBraga

Reputation: 2165

You need to use the source section and put your pl/sql code there:

enter image description here

If you need to mark more than one checkbox, you need to return the values of these checkboxes in a string like that: '1:3:4'.

Example: https://apex.oracle.com/pls/apex/f?p=145797:20


In your case the code should be something like this:

--this function should return a string with values separated by colon
--Ex. '1:3:4'
BEGIN
  RETURN myfunction(myparameters);
END

Upvotes: 1

Related Questions