Solved

Oracle forms query

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
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 …
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

911 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

22 Experts available now in Live!

Get 1:1 Help Now