Home » Developer & Programmer » Forms » FRM-40112 on go_item to an enabled item (Forms-12)
FRM-40112 on go_item to an enabled item [message #685337] Fri, 10 December 2021 09:33 Go to next message
Toinette
Messages: 2
Registered: December 2021
Junior Member
Hi,

I'm trying to navigate from an item to another in a key-next-item trigger.

When I change the value of the current item if the next item is disabled I put its visible, enabled, update_allowed and navigable properties to PROPERTY_TRUE.
I also change the current item next_navigation_item property to the following enable item.

Then I call GO_ITEM(GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, NEXT_NAVIGATION_ITEM));

I checked with an alert message, all next item properties are set to true when I call GO_ITEM, but on navigation I got the FRM-40112 error : Attempted go_item to non enabled item.

When the next item is visible and doesn't change state I can navigate without any problem.

P_AVERTISSEMENT(
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, ENABLED)
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, DISPLAYED)
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, ECHO)
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, INSERT_ALLOWED)
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, ITEM_IS_VALID) -- This is the only one to FALSE
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, NAVIGABLE)
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, QUERYABLE)
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, VISIBLE)
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, UPDATE_ALLOWED)
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, UPDATE_PERMISSION)
|| ' - ' || GET_ITEM_PROPERTY(:SYSTEM.TRIGGER_ITEM, NEXT_NAVIGATION_ITEM));


Example :

NAVIGATION FRAME : CURRENT_ITEM -> NEXT_ITEM1 -> NEXT_ITEM2

CURRENT_ITEM IS NULL
NEXT_ITEM IS VISIBLE, ENABLED AND NAVIGABLE

NAVIGATION WORKS FINE : CURRENT_ITEM -> NEXT_ITEM1 -> NEXT_ITEM2

CURRENT_ITEM CHANGED FROM NULL TO ONE
NEXT_ITEM IS VISIBLE, ENABLED AND NAVIGABLE

NAVIGATION WORKS FINE : CURRENT_ITEM -> NEXT_ITEM1 -> NEXT_ITEM2

CURRENT_ITEM CHANGED FROM NULL TO ZERO
I SET IN THE KEY-NEXT-ITEM TRIGGER THE VISIBLE PROPERTY OF NEXT_ITEM1 TO FALSE AND THE NEXT_NAVIGATION_ITEM PROPERTY OF CURRENT_ITEM TO NEXT_ITEM2 : NEXT_ITEM1 IS NOT VISIBLE, ENABLED AND NAVIGABLE ANYMORE

NAVIGATION WORKS FINE : CURRENT_ITEM -> NEXT_ITEM2

CURRENT_ITEM CHANGED FROM ZERO TO NULL
I SET IN THE KEY-NEXT-ITEM TRIGGER THE VISIBLE, ENABLED, NAVIGABLE PROPERTY OF NEXT_ITEM1 TO TRUE AND THE NEXT_NAVIGATION_ITEM PROPERTY OF CURRENT_ITEM TO NEXT_ITEM1 : NEXT_ITEM1 IS VISIBLE, ENABLED AND NAVIGABLE

NAVIGATION DOESN'T WORK : CURRENT_ITEM -> NEXT_ITEM1 : FRM-40112 : Attempted go_item to non enabled item NEXT_ITEM1

Does somebody know why I get this error and how to solve it ?
Re: FRM-40112 on go_item to an enabled item [message #685342 is a reply to message #685337] Mon, 13 December 2021 05:42 Go to previous messageGo to next message
Toinette
Messages: 2
Registered: December 2021
Junior Member
It's solved
I was in ENTER-QUERY mode and the property QUERYABLE wasn't set to PROPERTY_TRUE.
Re: FRM-40112 on go_item to an enabled item [message #685343 is a reply to message #685342] Mon, 13 December 2021 05:48 Go to previous message
Michel Cadot
Messages: 68165
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Thanks for your feedback.

Previous Topic: Error 103 in my query
Next Topic: Migration and upgrades
Goto Forum:
  


Current Time: Wed May 18 02:04:53 CDT 2022