Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Oracle forms query

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious sideā€¦
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

839 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