Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Loop through apex items

Richie VNov 3 2017 — edited Nov 3 2017

I have a page filled with select lists where users will select an option type and an option. A user can select up to 40 or more options.

Rather than store every single value in the database I want to only select the values that are not null and insert them into the database.

So essentially what I want to do is the following

for all_page_options ( select all the page items that are not null)

loop

Insert items that are not null into the database

end loop;

My problem is that I don't know how to reference the page items in the loop. On the page they are select lists populated by a lov query

the item names are option1, option2, option3..... etc. and option_type1, option_type2.....etc.

If you can help me with how to reference the select list page items I can probably construct the rest of the loop, NOTE *** these are items the user will select from the select lists the values don't exist in the database as of yet. (I was going to create a table with 40 option fields and 40 option type fields and set the source for the database columns but there must be an easier way right?.

I am currently using apex 4.2

pastedImage_0.png

How do I reference these page items in the loop if they all have different names?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2017
Added on Nov 3 2017
3 comments
2,314 views