Home » Developer & Programmer » Forms » Assigning a value to display item
Assigning a value to display item [message #428768] Thu, 29 October 2009 22:42 Go to next message
theowais
Messages: 75
Registered: October 2009
Location: Multan
Member
Dear all,

In a emp-table there is a join-date field.

I want to careate an item field join-day.

It will be a display item and display the day of join-date at run time. Also at the time when I enter a new record.

Please guide me by using your knowledge.

Regards,

M. Owais Ansari
Re: Assigning a value to display item [message #428780 is a reply to message #428768] Fri, 30 October 2009 00:30 Go to previous messageGo to next message
lancer26
Messages: 52
Registered: May 2006
Location: Pakistan
Member

on "when new record instance" :join_day := to_char(:join_date,'day')
Re: Assigning a value to display item [message #428790 is a reply to message #428780] Fri, 30 October 2009 01:55 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'd rather go with POST-QUERY block-level trigger (for records that are already stored in the database) and WHEN-VALIDATE-ITEM trigger during insert/update actions.
Re: Assigning a value to display item [message #428867 is a reply to message #428790] Fri, 30 October 2009 06:54 Go to previous messageGo to next message
theowais
Messages: 75
Registered: October 2009
Location: Multan
Member
Please mention with detail (code)!
Re: Assigning a value to display item [message #428876 is a reply to message #428867] Fri, 30 October 2009 07:52 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Please do the homework, study the documentation, write your own code and - if it still doesn't work - ask for additional help.
Re: Assigning a value to display item [message #429496 is a reply to message #428876] Wed, 04 November 2009 04:29 Go to previous messageGo to next message
theowais
Messages: 75
Registered: October 2009
Location: Multan
Member
Applying code (:day:=to_date(:date,'Day');) at
WHEN-VALIDATE-ITEM at item level
POST-QUERY at block level
Errors
FRM-40735
ORA-01846


[EDITED by LF: disabled smilies]

[Updated on: Wed, 04 November 2009 05:10] by Moderator

Report message to a moderator

Re: Assigning a value to display item [message #429514 is a reply to message #429496] Wed, 04 November 2009 05:13 Go to previous message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oracle
ORA-01846 not a valid day of the week

Cause: A date specified an invalid day of the week.
Oracle
FRM-40735: %s trigger raised unhandled exception %s.

Cause: Application design error. The current trigger raised an exception (other than FORM_TRIGGER_FAILURE), but it did not handle the exception.

Action: Rewrite the trigger text to handle the exception.

I guess you meant to use TO_CHAR function, not TO_DATE. Or, perhaps not. But you might provide additional information (such as ":date" item's datatype and values stored within).
Previous Topic: oracle form runtime error
Next Topic: Maximum no of rows in a list block
Goto Forum:
  


Current Time: Sun Dec 04 22:46:03 CST 2016

Total time taken to generate the page: 0.13089 seconds