What is the code behing your LOV-button?
Both buttons are the same.
And whats in that procedure?
I'll try to track down the code for the utllgui_lov_button_pressed procedure.
Sorry I can't check. It's an attached library from the client. It's used for all LOV buttons for all forms, so I highly doubt it would set the Var Group Insert and Update to No.
What if I set the property for the Var Group prior to the utllgui_lov_button_pressed procedure being called?
So you develop "in the dark" ? How are you supposed to find an error without knowing your framework?
I guess that this procedure does something like
and 'THE_ITEM_NAME' maybe somehow derived from the button-name. A wild guess would be that the button is not named properly and therefore the GO_ITEM does not work.
Another chance would be to put a KEY-LISTVAL-trigger at your LoV-Item and check there if INSERT_ALLOWED and UPDATE_ALLOWED are set correctly.
I'll give it a shot. Forcing the value doesn't work.
I created a KEY-LISTVAL on the Var Group item and added the following code:
if get_item_property(:AGNVARGRP.VAR_GROUP_ID, INSERT_ALLOWED) = 'No'
or get_item_property(:AGNVARGRP.VAR_GROUP_ID, UPDATE_ALLOWED) = 'No' then
message('Insert or Update property set to No');
I'm still getting the FRM-41051 error. What am I doing wrong?
This block contains the following triggers:
None of them directly set the Insert or Update to No. I'm going to go through all the Stored Procedures in each trigger to see if something is triggered there.
First, there are several errors in your code
1. GET_ITEM_PROPERTY return 'TRUE' or 'FALSE'
2. The first argument to GET_ITEM_PROPERTY is the item-name, you give the item-value, it should be get_item_property('AGNVARGRP.VAR_GROUP_ID'
From the errors you get (or don't get) i would guess that the KEY-LISTVAL-trigger isn't raised at all. Try to press the lov-key "by hand" in that item. Also, i'm still sure you will need the pll with that "magic" procedure, otherwise we can't do anything but guessing.
Sorry for the late reply.
I'm now getting an error:
FRM-40105: Unable to resolve reference to item.
Sorry my bad, I made a mistake in the code. I've fixed the issue. Now the trigger tells me that the update and insert are set to 'Yes' as expected. Thoughts?
Maybe I should to another root, does anyone have a link to how to properly setup multiple LOVs in a single form?