Solved

Forms and text-boxes

Posted on 2001-06-05
3
1,469 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
Comment Utility
In case status has limited values U could use decode option in query.
0
 
LVL 47

Accepted Solution

by:
schwertner earned 50 total points
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

Suggested Solutions

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to take different types of Oracle backups using RMAN.

772 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

10 Experts available now in Live!

Get 1:1 Help Now