Solved

Forms and text-boxes

Posted on 2001-06-05
3
1,475 Views
Last Modified: 2006-11-17
I've created a form based on a table UserInfo.
One of the fields is a CHAR(1) column storing the status of the user.

On the form I want to display the meaning of that single-character as well. What I tried was to create a trigger for WHEN-NEW-RECORD-INSTANCE as follows :-

BEGIN
  if (GET_ITEM_PROPERTY('STATUS',DATABASE_VALUE)='1')
      <write into the text-box TXT_STATUS>
  endif;
END;

As you can see I can't figure out the code for writing into the TXT_STATUS box.

I could use SET_ITEM_PROPERTY but can't seem to figure out which property to set!

Pls. help.

Thanks,

-- Asim
0
Comment
Question by:asim_shankar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:ddandekar
ID: 6155651
In case status has limited values U could use decode option in query.
0
 
LVL 48

Accepted Solution

by:
schwertner earned 50 total points
ID: 6155665
Use the PL/SQL statement:

IF :block_name.column_name = '1'
THEN :block_name.TXT_STATUS := 'Desired Value'
END IF;

The only prerequest is to deliver the value into :block_name.column_name  using default select statement or other select statement and to define the appropriate lenght and data type for the control item :block_name.TXT_STATUS
0
 
LVL 48

Expert Comment

by:schwertner
ID: 6155945
IF :block_name.column_name = '1'
THEN :block_name.TXT_STATUS := 'Desired Value';
ELSIF :block_name.column_name = '2' THEN :block_name.TXT_STATUS := 'Desired Value_1';
ELSIF :block_name.column_name = '3' THEN :block_name.TXT_STATUS := 'Desired Value_3';
END IF;

Thank you!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to recover a database from a user managed backup

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question