Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display values in a field(wich has a lov) when navigateing 1

Status
Not open for further replies.

mariacri11

Programmer
Apr 9, 2003
22
CY
This is the problem: I have a form for putting data into a table and one of the fields has a lov atached. The field reprezents a name You select the name from the lov and it returns this name to the field and a code to other field. But in the table I insert only the code. Everything goes ok when I add records.
What goes wrong is that when I navigate through the records(with next_record or previous_record)the name field doesn't disply anything. How can I repair this situation?
Hope someone knows and understands what I mean!
 
It sounds like you need to write a post-query trigger on the block to select the name that matches the code.

Code:
select * from Life where Brain is not null
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
[sup]When posting code, please use TGML to help readability. Thanks![sup]
 
Thank you, BJCooperIT, that really solved the problem.
One problem would be that, on commit, all the records browsed are considered changed and are rewritten to the table.. Do you have a magic solution for this? Thank you.
 
Assuming the name is a non-database field then what this is telling you is that forms thinks something needs to be updated in the database for the record. If this is not the case: in the POST-QUERY use SET_RECORD_PROPERTY to set the record status back to query.

Code:
select * from Life where Brain is not null
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
[sup]When posting code, please use TGML to help readability. Thanks![sup]
 
BJCooperIT wrote:
'Assuming the name is a non-database field then what this is telling you is that forms thinks something needs to be updated in the database for the record. If this is not the case: in the POST-QUERY use SET_RECORD_PROPERTY to set the record status back to query. '

or maybe better, put this filed in another block.

Regards

Christian
 
If the name is to reflect the value of the code field in the block being navigated and the name field is moved to another block then it will be necessary to reselect the name in the WHEN-NEW-RECORD-INSTANCE. This is too much overhead to go back to the database each time you move from record to record. Also it won't work if more than one record is displayed.

Code:
select * from Life where Brain is not null
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
[sup]When posting code, please use TGML to help readability. Thanks![sup]
 
I'd like telling you my experience about this case. When a value is assigned to a non-database field in post-query trigger, the record status is not altered. The matter, here,is the validation process, which starts when the record is loaded. We have a text item with a LOV attached and, I'm sure, with "Validation from List = Yes". That is the question. When you assign the value to the Text Item, it will be pending of validation. When this occurs (record is loaded), the mechanism of LOV fires. Internally, the LOV mapped columns will be assigned, you know. In this moment, the record status is fixed as CHANGED. In others words, when you put programatically the value in this kind of Text Item, it's like if an user opens the lOV and selects the value.

I don't know if you have still problems with this. If you have, I can give you the solution we have found.

Please, forgive my english, again.
Greetings.
Enrique.
 
Hi Enrique,
I am facing the same problem.Please send the workaround to me ASAP at himanshu.bhardwaj@polaris.co.in


Thanks & Regards
Himanshu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top