0
votes

I have an interactive report with two regions.

The first region is static region with a select list and a button to submit the process.

The second region is the report region which refreshes the region based on first region select list value and Process (calculate) button submitted.

However if I try to submit same item (List of values) subsequently the process button must be disabled. (i.e) Any repetition of same List of values, once calculation or process is performed, the calculate button must be disabled and these are all based on input selection from front end.

Please note there is not any direct relationship between the Select list button (Page item) and second region columns and I cannot achieve it by distinguishing at database level if it is processed or unprocessed, as there is not any column maintained in database tables (in this case second region about year which is processed).

How can process be disabled second time?

and only if select list for quarter is entered for first time the process button (Calculate) must be enabled based on.

The second region values are populated/refreshed by swapping the columns this_year_q1 to last_year_q1, last_year_q1 to year_before_last_year_q1 etc., if calculate button is enabled and process is called.

enter image description here

So in below case, the calculate button is enabled when select list is (Quarter is Q4:01/10/2017 to 31/12/2017), this is fine and must allow process for first time.

Subsequent reselection of same value must not allow process to calculate.

1:

1

1 Answers

0
votes

Here's an idea:

  • create a (hidden) page text item
  • using a dynamic action on a button
    • compare current Select List item's value with hidden item's value (don't forget the NVL function!)
    • if they don't match, put current (selected) Select List item value into the hidden item so that you could check it when the button is pressed once again (i.e. whether user selected the same value or not) and submit
    • if they match, do nothing (don't submit)

If you don't want to run the report twice not only for subsequent executions but during the session, you'd have to store selected values somewhere (a table?). The rest would be the same - you'd only have to select from that table and compare Select List's values with values already used.