Oracle Forms 10g LOV not showing up second time - oracle10g

I have created Oracle Forms 10g form and want to display LOV by pressing the button. On When-Button-Pressed trigger I have:
go_item('MyBlock.Item1');
do_key('LIST_VALUES');
LOV has 6 columns and 2 of them are bound to 2 items: MyBlock.Item1 and MyBlock.Item2. When I press the button LOV appears and I can make a choice. LOV inserts data into MyBlock.Item1 and MyBlock.Item2 and everything is fine.
But if I want to make another choice and press the button again LOV doesn't appear. I don't know what is the problem.
Button and both items are in the same data block, I set Update Allowed and Required to No for both items and Mouse Navigate to No for button (I saw this on few forums).

Try putting synchronize command between these two lines:
go_item('MyBlock.Item1');
Synchronize;
do_key('LIST_VALUES');

I finally found solution (using oracle's OTN discussion).
The problem was stored procedure I call after first popping up of LOV. First time, after I chose a value I delete record of another block using stored procedure. In that procedure I set values of columns MyBlock.Item1 and MyBlock.Item2 are connected with. But on the form the old values remains on items. I removed update this two columns in procedure and it works now. But I needed this two fields to be updated to null automatically.
The solution is that I first change values of those items on form and then I call stored procedure. It works now.

Related

What for using KEY-LISTVAL in item trigger?

I had been working on oracle form 6i for long time and now convert to 12c.
I used not to create item trigger KEY-LISTVAL to handle LOV pop up because the LOV works perfectly as long as the LOV attached to a correct item.
However, some programmers likes to create KEY-LISTVAL to each items which has LOV attached. In the item trigger writes:
list_values;
LOV seems work no different even without this code. Why using this trigger?
Many thanks.
We use it most of the time to create an if statement in the trigger.
If the item is empty select the value with an lov (list_values).
If the item is not empty open another form with the details of the value you selected.
If the KEY-LISTVAL trigger has its "Fire in Enter-Query Mode" property set to "No", this could allow an LOV to be used in data entry mode, but not in query mode.

oracle form ''you cannot update this record''

I have a procedure in which I get values from different tables and calculate a certain decimal number. After that i try to post it on a form text-field which is a database item (update and insert allowed on the settings of block and item). everything works fine but the result wont show on the item and won't save in the database field. I get the error
"you cannot update this record".
Can someone help? i have been working on it for two days now and can't find anything.
Did you check if your user has update access on the table?
Check also if there are database triggers on the table that prevents you from updating the record.

How I can add a row and input field on button click in lotus note 8.5. form?

I have question about Lotus Note. I have form: http://i.stack.imgur.com/YWii6.jpg
In this form I need create bottom. With this buttom user can add new row with input field in this row to existing table. I find that kind of lotusscript from:
http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.1/com.ibm.designer.domino.main.doc/H_EXAMPLES_ADDROW_METHOD_RTTABLE.html
But when I this script copied to this form, I get error "Object variable no set"
Then I tried this solotion:
LotusNotes 8.5 - Adding a row to a table with a button
And I again get the same error.
Can anybody tell me please, how I can create new row and input field in this row, when I pressed buttom "Add row"?
You can't make a table with a dynamic amount of rows in a Lotus Notes Form. There are two common ways to solve this:
Use child-documents; one document for each row; and show these documents using an embedded view. This is the most elegant imho.
Create a large, fixed-elements table, and hide the rows that are not needed (for instance, by checking the presence of an input in the preceding row. This is OK for small amounts of row, but performance starts getting bad if you have too many rows.
It seems you are a bit confused as to the difference between a form (your picture) and a document (the code you link). Also, you definitely need to understand the meaning of "Object variable not set", which is the most common error when you use Lotusscript.
Anyhow, where to go from here depends on how you plan using the data once it is input. Will it be edited ? Will each row need to be handled as a separate record ?

Access Form won't accept input in text boxes

So I have a form in Access.![acessform1][1]
Here are form properties
I got this database and have been making adjustments to the other forms. I gave the database back to the user and they reported an issue that this form is not acting properly, and the add order record function is not working anymore.
There's an Add Order Record button on the right side of the form that would usually add the record if the user manually entered input into some of the boxes. The old form you would have control of the values 1/0 for yes/no. You can enter text into the notes boxes.
This functionality doesn't work anymore, and I can't seem to figure out why. The form is identical to the original and no adjustments have been made except to the table that it pulls data from.
So the symptoms are:
User input is not accepted in text boxes.
The find CP functionality works with the drop down and reflects the records accurately but I cannot update the fields.
Also, the fields CP_Ref and Invoice date don't let me enter data anymore.
Also the Add Order Record was giving me an error that The it could not find the record specified, but I since copied the original form back into place and that error went away.
I think functionality wise this button should save the record after a field is updated and should add a new record.
Seems like all the controls are locked on the page.
Here is the query that pulls the data when I click the button that takes me to the Order form.
SELECT DISTINCTROW CPOrders.Cust, Customer.NAME, CPOrders.CP_Ref, CPOrders.Slsman,
CPOrders.Date_opn, CPOrders.CPSmall, CPOrders.InvIssu, CPOrders.InvNo,
CPOrders.InvDate, CPOrders.DueDate, CPOrders.ETADate, CPOrders.Closed,
CPOrders.Cust, CPOrders.Name, CPOrders.BuyerRef, CPOrders.ToCity,
CPOrders.ToState, CPOrders.ToCtry, CPOrders.ToPort, CPOrders.Supplier,
CPOrders.Origin, CPOrders.Product, CPOrders.GradeType, CPOrders.NoUnits,
CPOrders.Pkg, CPOrders.Qty, CPOrders.TotSale, CPOrders.TotCost,
CPOrders.GrMargin, CPOrders.[Sale$/Unit], CPOrders.[Cost$/Unit],
CPOrders.OceanCost, CPOrders.OceanNotes, CPOrders.BLadingDate,
CPOrders.USAPort, CPOrders.FOBCost, CPOrders.FASExportVal,
CPOrders.InlandFrt, CPOrders.CommodCode, CPOrders.Notes,
CPOrders.ProjCust, CPOrders.ProjValue, CPOrders.ContainerNumber,
CPOrders.Vessel, Customer.TERMS
FROM Customer INNER JOIN CPOrders ON Customer.[CUST_#] = CPOrders.Cust
ORDER BY CPOrders.CP_Ref;
I ended up checking several locations for the answer to this.
What it ended up being was a primary key issue.
Essentially when I got the updated database I put them into new tables, effectively destroying the dependencies, relationships, and established keys.
I reverted back to the old tables and found out the form worked properly.
The issue ultimately was that the primary keys were not defined as needed for the table to be updated.

How to create update process for single entry form in APEX 4.1

I'm new to APEX. I am sure this solution might be available, but was unable to find a proper answer anywhere.
Here is the case scenario: (Provide user a capability to update a particular report row).
Page 1 has report A in which there is a particular column say column B which has links to all its row, by clicking on one particular row user navigates to the new page (Page2).
Page 2 has single entry form in region one which has list of items (around 10) and on region 2 of the same page (page 2) it has a tabular form.
Some of the items in region 1 of page 2 are populated based on the information from page 1 report details. Some items have LOVs and some item user can add information.
The tabular form in region 2 of page 2 is generated based on line item id which can be edited by the user. The tabular form is associated to one table only.
There are two buttons on the page, cancel button takes back to the report page, whereas the save button will save the data to the database tables. The single form items will update 2 tables, whereas tabular form will update one tables.
How the process needs to be establish for updating the underlying tables through apex.
Right now Tabular form has MRU update built in process(but I am not sure can I use this process in coordination with single entry form or it is better to create a separate process which handles both updates)
Can anybody give me an idea how this can be accomplished, or a link where such process has been explained?
You will need to manually create plsql processes to process the submitted values and apply them to your tables. You can not use the built-in row processing to do this: you can not define 2 per page. (That makes sense because you can not indicate which column maps to which table. You can only define "database column" as source for an item. This means that even if you were to have 2 processes, these columns would be attempted to process on both processes, which would lead to errors.)
Take a look at this post for some ideas on how to set the processes up: https://stackoverflow.com/a/7877933/814048
if :P42_ORDER_STATUS in ('IP','OW') then
begin
FOR I in 1..APEX_APPLICATION.G_F01.COUNT LOOP
update sales_mst set ORDER_STATUS = 'DR'
where id = to_number(apex_application.g_f01(i));
end loop;
end;
end if;