Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

FORMS 9i- help with SET_ITEM_PROPERTY

Posted on 2006-11-09
3
Medium Priority
?
1,906 Views
Last Modified: 2008-01-16
I have a field on my form as a TEXT ITEM and the properties are ENABLED YES, VISIBLE NO.

WHen I start the form the field is hidden just as I want it to be. But when I run some code, it shoudl become VISIBLE, but its not.

My code is

IF :acctount > 0 then
    set_item_property('TXT_AMOUNT',enabled,property_true);
    set_item_property ('TXT_AMOUNT',visible, property_true);
end if;

0
Comment
Question by:joekeri
[X]
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
3 Comments
 
LVL 6

Accepted Solution

by:
Ritesh_Garg earned 140 total points
ID: 17912178
First thing is check if this piece of code is really executing.
Put some message and use pause;
Also before you run / create fmx, use ctl+shift+k so that the form compiles completely.

If you are sure that these above are not the reason, try using synchronize;
E.g.

IF :acctount > 0 then
    set_item_property('TXT_AMOUNT',enabled,property_true);
    set_item_property ('TXT_AMOUNT',visible, property_true);
end if;
Synchronize;


Thanks,
Ritesh
0
 
LVL 12

Expert Comment

by:jwahl
ID: 17912312
also make sure that the item is on the correct canvas, tab page etc.
check the position of the item in the layout editor.
you can also check if the trigger is executed correctly with some extra checks (e.g. in an WHEN-MOUSE-DOUBLECLICK trigger);

BEGIN
    IF GET_ITEM_PROPERTY('TXT_AMOUNT',visible) = 'TRUE' THEN
        MESSAGE('Item is visible at ' || GET_ITEM_PROPERTY('TXT_AMOUNT', x_pos) || '/' || GET_ITEM_PROPERTY('TXT_AMOUNT', y_pos));pause;
    ELSE
        MESSAGE('Item is NOT visible!');PAUSE;
    END IF;
END;
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 17913032
yes, try synchronize; once to see whether it is an issue related to memory/canvas refresh.

Thanks
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

715 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