Anshul Ayushya
Anshul Ayushya

Reputation: 129

looking for plsql code based on oracle apex layout design

I have created a hidden item "P1_DOCUMENTS_COUNT" with default of 1. used plsql too increase it when users clicks the button "add row". Created 10 times the following row of items (# for the row number): P1_DOC_DATE_#, P1_DOC_DESCRIPTION_#, P1_DOC_NAME_#, P1_DOC_CATEGORY_#, P1_DOC_FILE_BROWSER_#. at the beginning - rows 2-9 will be hidden. when P1_DOCUMENTS_COUNT = n, show rows 1,2,...n.

Issue is I have cancel button on each row, I am looking for a solution so that if none of cancel button clicks then 1 by 1 clicking add row it shows all 10 rows but if cancel button gets clicked in the middle then that row should also appear by clicking add row. hope i clear my point.

enter image description here

for more info please check url: Multiple conditions on single button with Dynamic Action in Oracle Apex

Upvotes: 0

Views: 102

Answers (2)

Anshul Ayushya
Anshul Ayushya

Reputation: 129

Create 9 hidden Items with default value of 0 (these are supposed to be hidden at the time when page loads) Now on each click of Add Row button perform PLSQL code to check whether the Row is showing of 6 Items if not then change the value of hidden item to 1 and those row will be showing. NOTE:- There are separate DA to show and hide items, 6 Items of row based on the value on hidden items.

Upvotes: 0

YotamW Constantini
YotamW Constantini

Reputation: 410

Instead of braking your head on it - just change the "cancel" button to a "clear" button and empty the contents of the items without hiding the row.

alternatively - create an array of size 10 and keep the information on what's been clear in it

Upvotes: 1

Related Questions