Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » communication between two form without reset all variables (APEX 4.0)
communication between two form without reset all variables [message #648224] Thu, 18 February 2016 23:46 Go to next message
pcouas
Messages: 112
Registered: February 2016
Senior Member
Hi,



I have two pages. First page has two buttons Create and Modify.
Second page contains many fields and one field must be initialzing from first page even if it's creation Button, but in this case the others fields must be blank.
Currently i clear cache on Create button. If i do not, that's keeping all fields values in second page.
How could i send only one field in creation mode button and reset all fields ?


Regards

Phil
Re: communication between two form without reset all variables [message #648229 is a reply to message #648224] Fri, 19 February 2016 01:12 Go to previous messageGo to next message
Littlefoot
Messages: 21580
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The "trick" here is to submit the first page (in order to put its item's value into session state), and then redirect to the second page.

If you use "Redirect to page in this application" as the button's action, it will do as requested - clear the second's page cache, navigate to the second page, but it won't be able to transfer item's value as it isn't stored in session state.

Therefore, here's one option you might try:
  • Suppose that the first page's "Create" button is named P1_CREATE
  • It should SUBMIT when pressed
  • The "Button Request Source Type" should have its default value - "Static Assignment" as it will result with the request name to be equal to button name (i.e. P1_CREATE)
  • Create a branch (under the Processing node)

    • Branch point: On submit: before processing
    • Target type: page in this application
    • Page: the second page (suppose its number is "2")
    • Request: put the "Create" button's name in here (as it is equal to request), i.e. P1_CREATE
    • Clear cache: 2 (i.e. clear the second page's cache)
    • Set these items: name the second page's item which should contain the first page item's value. For example, P2_ID
    • With these values: name of the first page's item whose value should be transferred to the second page. For example. &P1_ID. (note both ampersand and dot! It *must* be "&ITEM_NAME.")
    • When button pressed: P1_CREATE

That should do it. At least, it did for me.

[Updated on: Fri, 19 February 2016 01:14]

Report message to a moderator

Re: communication between two form without reset all variables [message #648275 is a reply to message #648229] Fri, 19 February 2016 10:21 Go to previous message
pcouas
Messages: 112
Registered: February 2016
Senior Member
Hi,

That's Ok thanks
Previous Topic: ORA-31011: XML parsing faile
Next Topic: Form with associated label
Goto Forum:
  


Current Time: Wed Aug 12 08:19:27 CDT 2020