Home » Developer & Programmer » Forms » i need help with show items (oracle forms 10g,windows xp sp3)
i need help with show items [message #540179] Fri, 20 January 2012 10:01 Go to next message
ahmed.arafa
Messages: 3
Registered: January 2012
Location: Egypt
Junior Member
hii all,
i have a list item.. in this list item i have a two list item value
1- visa ,list elements visa
2- cash ,list elements cash
i need when user select visa from list item then appear text item (visa_number)
i change item visa_number visible to no
that's my code i write it
trigger
when new-block-instance
IF :RESERVATION.PAY_METHOD = 'visa'THEN
	 SET_ITEM_PROPERTY('RESERVATION.VISA_NUMBER',VISIBLE,PROPERTY_TRUE);
ELSE
         SET_ITEM_PROPERTY('RESERVATION.VISA_NUMBER',VISIBLE,PROPERTY_FALSE);	
END IF;

**My problem is when i click on cash in the first nothing happen and this right
when i click to visa second nothing happen this not right
**when i click on visa first every thing is working
i need when i click on visa any time item appear and when i would like to click to cash.. visa item is disappear

Thank's all
sorry for my english


[MERGED by LF. Applied [code] tags]

[Updated on: Fri, 20 January 2012 10:31] by Moderator

Report message to a moderator

Re: i need help with show items [message #540187 is a reply to message #540179] Fri, 20 January 2012 10:34 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
i need when user select

If that's so, why did you use WHEN-NEW-BLOCK-INSTANCE trigger? I'd rather use two triggers:
- WHEN-VALIDATE-ITEM for newly added / updated values
- POST-QUERY for records fetched from the database

Put the same code (the one you already posted) into both of these triggers.
Re: i need help with show items [message #540188 is a reply to message #540187] Fri, 20 January 2012 10:46 Go to previous messageGo to next message
ahmed.arafa
Messages: 3
Registered: January 2012
Location: Egypt
Junior Member
thank's but not working
i make a trigger
WHEN-VALIDATE-ITEM
on list item
and i make
POST-QUERY on form level

Re: i need help with show items [message #540209 is a reply to message #540188] Fri, 20 January 2012 14:04 Go to previous message
ahmed.arafa
Messages: 3
Registered: January 2012
Location: Egypt
Junior Member
thank's all i solve it
i create a trigger
WHEN-LIST-CHANGED
IF :RESERVATION.PAY_METHOD = 'VISA'THEN
SET_ITEM_PROPERTY('RESERVATION.VISA_NUMBER',VISIBLE,PROPERTY_TRUE);
SET_ITEM_PROPERTY('RESERVATION.VISA_EXPIRE',VISIBLE,PROPERTY_TRUE);
ELSE
SET_ITEM_PROPERTY('RESERVATION.VISA_NUMBER',VISIBLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('RESERVATION.VISA_EXPIRE',VISIBLE,PROPERTY_FALSE);
END IF;
Previous Topic: Run form from formbuilder doesn't connect to db
Next Topic: changing the button color at runtime
Goto Forum:
  


Current Time: Mon Sep 16 06:13:12 CDT 2024