Home » Developer & Programmer » Application Express & MOD_PLSQL » Setting value of an item depending on the value of another item (apex 4.0.2)
Setting value of an item depending on the value of another item [message #538022] Tue, 03 January 2012 09:42 Go to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
Hello Smile

I have a problem with the confirmation page of my wizard.
My situation is thus: on page 1 I have item P1_PAYMENT_TYPE (Radio buttons) returning values 'Cash' or 'Voucher'. Using dynamic actions, when Cash is selected another item P1_CURRENCY appears (also Radio Buttons) returning values '1' or '2' for display values 'CHF' and 'EUR' respectively. Then if 'Voucher' is selected an item P1_COST_CENTER (text field) appears with default value 'CH20' and they add on a number.
Now, from the confirmation page, an email is sent and in that email I need to have the Payment type and depending on that payment type either the currency or the cost center.
Thing is I want the CHF or EUR not 1 or 2 as the currency should Cash be selected.
How do I do this?

I hope i've made sense...I've tried various ways but can't quite get it...
What I've tried:
I Created an item on the confirmation page P11_EMAIL_PAYMENT_DETAILS which I have tried populating with dynamic actions:
On Page Load Set Value &P1_COST_CENTER. condition: P1_PAYMENT_TYPE is Voucher
and then another
On page load set value (sql statement: Select CURRENCY from FM_CURRENCY where ID = &P1_CURRENCY.) condition: P1_PAYMENT_TYPE is Cash
(Both the set values are for the P11_EMAIL_PAYMENT_DETAILS iem)

That was the closest I've got...it worked but only when the item was not hidden...when I tried to hide the item I got a checksum error when I tried to submit the page
(incase its important: Checksum error for Hidden and Protected item ID (40043901441235898), value (CHF), posted checksum (4454A9129E219628742291087979FBBA), expected checksum (********************************), index_i (17), index_j (10), index_m (11); )

So yeh would be very gratefull for any help
thanks Smile

[Updated on: Tue, 03 January 2012 09:45]

Report message to a moderator

Re: Setting value of an item depending on the value of another item [message #538049 is a reply to message #538022] Tue, 03 January 2012 12:50 Go to previous messageGo to next message
Littlefoot
Messages: 19650
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I can't test it now, but - two options I can think of.

How about moving that "hidden" item to page zero?

Or: leave it on the current page, make it a text item, but set it conditional appearance to "never".

Any improvement?

As of the "Checksum error": does it appear ALWAYS? What happens if you simply refresh the page after seeing that error?
Re: Setting value of an item depending on the value of another item [message #538119 is a reply to message #538049] Wed, 04 January 2012 03:04 Go to previous messageGo to next message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
Hi, changing the item to conditional 'never' works perfectly. I should have thought of that *sigh*

as for the checksum: yes, it appears every time, if I refresh nothing changes, if I press 'ok' and try again nothing changes. Is that a bad sign?

but thanks Smile
Re: Setting value of an item depending on the value of another item [message #538123 is a reply to message #538119] Wed, 04 January 2012 03:10 Go to previous messageGo to next message
Littlefoot
Messages: 19650
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
Is that a bad sign?

Well, let's put it as follows: if your application was a horse, you should shoot it.

Just kidding; it *probably* means something, but I wouldn't know what. Errors like that ("checksum", "4454A9129E219628742291087979FBBA", "index_i (17), index_j (10)") are just too horrible to see and remind me of ORA-00600 (Oracle bug). I suppose that the above are our (developers') mistakes, not Apex ones.

OK, never mind. I'm glad you fixed it (if conditional = never means that).
Re: Setting value of an item depending on the value of another item [message #538319 is a reply to message #538123] Thu, 05 January 2012 04:28 Go to previous message
balckbandit5
Messages: 104
Registered: December 2011
Senior Member
Quote:
Well, let's put it as follows: if your application was a horse, you should shoot it

haha actually got a little worried before I read the rest Razz
Previous Topic: Calling report from a form/report
Next Topic: Tabular form error
Goto Forum:
  


Current Time: Wed Oct 01 19:13:41 CDT 2014

Total time taken to generate the page: 0.10484 seconds