Solved

Oracle forms query

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

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
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…
This video shows how to recover a database from a user managed backup

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