Solved

Forms and text-boxes

Posted on 2001-06-05
3
1,470 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
  • 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 47

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 47

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

939 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now