Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 239 Big Data Appliance
- 1.9K Data Science
- 450.3K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 544 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.9K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.5K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 155 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 439 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
disableing an item in enter query mode
Answers
-
user619128 wrote:In your KEY-ENTQRY write the below code: this is tested on Forms 10g
Hi tony,
Thanks for the reply .I am not getting error when i am using the
set_item_property('EMPNO', enabled, property_false);
or
set_item_property('EMPNO', QUERY_ALLOWED, property_false);
but the error is that even after writing such kind of code in the run time when i am in enter query mode , i am able to insert char or number inside the empno field.
That is the problem it is behaving like it is not disabled.
I think now i am clear.
Regards
Anutosh
Edited by: user619128 on Aug 28, 2008 7:44 AM
If you need to disable querying of an item under a certain condition, include that condition in the trigger tooIF ... THEN SET_ITEM_PROPERTY('ENAME', QUERYABLE, PROPERTY_FALSE); END IF; ENTER_QUERY;
This will prevent the user from entering any text in the item when the KEY-ENTQRY trigger is fired. Remember to set it back to true when you cancel the query or when the query is executed.
Tony -
If you need to prevent the user from querying an item constantly, you can simply use the property palette and set the "Query Allowed" property to "No"
Tony -
I get the impression you're not reading the replies fully. For example, I said what trigger to put that code in, just above the code snippet, and you've not responded to numerous suggestions that you use the Query Allowed property of the item. Setting that property would be the best way to implement this functionality unless you need the item to be queryable under certain conditions.
The code I posted above will not work, please accept my apologies. The Enabled property has no effect in enter-query mode. However, this code has been tried and tested:if <condition> then set_item_property(<item>, queryable, property_true); else set_item_property(<item>, queryable, property_fase); end if; enter_query;
The code should go in the key-entqry trigger. -
Hi tony and u3
Thank you very much for your support but still even after writting this code into my KEY-ENTQRY trigger in the run time i am able to enter values in the perticular item.
I am using oracle 6i and the code is
if :system.mode = 'ENTER-QUERY' then
go_item('empname');
set_item_property('empno', queryable, property_false);
end if;
ENTER-QUERY;
can you people please suggest any thing.
Regards
Anutosh
can you please suggest. -
My main suggestion is that you read what people write. The code for the key-entqry trigger does not containif :system.mode = 'ENTER-QUERY' thenbecause you are not in enter-query mode at that point. This was only required in the when-new-record-instance trigger but, as I wrote before, that code sample will not work.
The solution is already here. I'm out. -
Hi u3 and tony
Thank you buddy ,thank you very much at last the code compiled and it is working like a dream.
The field is disabled,and i want to give thank all the people who have give there great idea from there very busy
schedule.really it is very nice to be in india and communicate with the rest of the world through the forum.
Thank you every body specially u3 and tony.
Thanks and Regards
Anutosh Bhattacharya -
you're welcome.
PS: If your question has been answered, please mark the question as answered, so it helps other people when they search the forums.
Edited by: Tony Garabedian on Aug 29, 2008 2:29 PM
This discussion has been closed.