Solved

Oracle forms query

Posted on 2013-11-08
5
290 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 35

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 35

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 35

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

763 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