Solved

Oracle forms query

Posted on 2013-11-08
5
283 Views
Last Modified: 2013-11-15
I have a code that sets values in the fields.

If v_load_drive_details_rec.total_drives > c1_rec.crew then
            set_item_property(v_item_name3_c, VISUAL_ATTRIBUTE, 'VA_RED');
End if;

Its putting the color on all the fileds. But I wanted this only if the condition is satisfied. I  have enclosed the picture for the one that needs to be color.

Help is appreciated.
code.txt
print-screen.JPG
expected.JPG
0
Comment
Question by:anumoses
  • 3
  • 2
5 Comments
 
LVL 34

Expert Comment

by:Mark Geerlings
ID: 39634380
I think you need to use: "set_item_instance_property" instead of "set_item_property".  The difference is: "set_item_property" will affect all records in a multi-record block, while "set_item_instance_property" will only affect one one record (the current record).
0
 
LVL 6

Author Comment

by:anumoses
ID: 39634414
If v_load_drive_details_rec.total_drives > c1_rec.crew then
            set_item_instance_property(v_item_name3_c,  CURRENT_RECORD,VISUAL_ATTRIBUTE, 'VA_RED');
End if;


Did not work.
0
 
LVL 34

Accepted Solution

by:
Mark Geerlings earned 250 total points
ID: 39634650
I supect that what is "not working" is your "if" condition.  That "set_item_instance_property" command *IS* the command you need to change an attribute for just one item (or: field) in one record of a multi-record block.

The other possibility is that CURRENT_RECORD does not have the value you expect it to have.  What trigger are you calling this in?  Is there any possibility that the form has navigated to a different record in the block than the one you want to have changed?
0
 
LVL 6

Author Comment

by:anumoses
ID: 39649491
I've requested that this question be deleted for the following reason:

None of the answers helped me. Please delete the question
0
 
LVL 34

Expert Comment

by:Mark Geerlings
ID: 39649492
What "Did not work"?  The "set_item_instance_property" command will do exactly what you asked for, if I understood your question correctly.  I think your question is basically: "how can I change the background color for one field (item) of just one record in a multi-record block"?
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

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to recover a database from a user managed backup

760 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

19 Experts available now in Live!

Get 1:1 Help Now